Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Adding LLM memory #12

Open
2 tasks done
thespacedeck opened this issue May 30, 2023 · 0 comments
Open
2 tasks done

[Feature] Adding LLM memory #12

thespacedeck opened this issue May 30, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@thespacedeck
Copy link

thespacedeck commented May 30, 2023

Is this your first time submitting a feature request?

  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing functionality

Describe the feature

add LLM memory to chat

const vectorStore = new MemoryVectorStore(new OpenAIEmbeddings());
    const memory = new VectorStoreRetrieverMemory({
      // 1 is how many documents to return, you might want to return more, eg. 4
      vectorStoreRetriever: vectorStore.asRetriever(1),
      memoryKey: "history",
    });

    // Build an LLM chain that will improve the user prompt
    const inquiryChain = new LLMChain({
      llm,
      prompt: new PromptTemplate({
        template: templates.inquiryTemplate,
        inputVariables: ["userPrompt", "conversationHistory"],
      }),
      memory: memory,
    });

Describe alternatives you've considered

No response

Who will this benefit?

everyone looking at the repository from coming from the article: https://www.pinecone.io/learn/javascript-chatbot/

Are you interested in contributing this feature?

yes would like to contribute :)

Anything else?

No response

@thespacedeck thespacedeck added the enhancement New feature or request label May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant