Skip to content

Commit

Permalink
fix invoke process for latest langchain.js
Browse files Browse the repository at this point in the history
  • Loading branch information
yuiseki committed Jan 14, 2024
1 parent 92ece9f commit 8aeacfd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/instruct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { PromptTemplate, FewShotPromptTemplate } from "@langchain/core/prompts";
import { SemanticSimilarityExampleSelector } from "@langchain/core/example_selectors";
import { ChatOpenAI } from "@langchain/openai";
import { MemoryVectorStore } from "langchain/vectorstores/memory";
import { OpenAIEmbeddings } from "langchain/embeddings/openai";
import { OpenAIEmbeddings } from "@langchain/openai";
import { BaseLanguageModel } from "langchain/base_language";
import { RunnableSequence } from "langchain/schema/runnable";

Expand Down Expand Up @@ -223,7 +223,7 @@ export const invokeCharitesAiChain = async (
chain: RunnableSequence<any, any>,
input: string
): Promise<void> => {
const result = await chain.invoke({
const { content: result } = await chain.invoke({
input: input,
});
console.info(result);
Expand Down

0 comments on commit 8aeacfd

Please sign in to comment.