diff --git a/libs/langchain-google-common/src/output_parsers.ts b/libs/langchain-google-common/src/output_parsers.ts index 8ca9377011ba..2c0d0d031022 100644 --- a/libs/langchain-google-common/src/output_parsers.ts +++ b/libs/langchain-google-common/src/output_parsers.ts @@ -23,9 +23,9 @@ export abstract class BaseGoogleSearchOutputParser extends BaseLLMOutputParser { ret = `${ret}${this.chunkToString(chunk, index)}\n`; }); diff --git a/libs/langchain-google-common/src/tests/output_parsers.test.ts b/libs/langchain-google-common/src/tests/output_parsers.test.ts index ac3c135f5279..f3be76f57456 100644 --- a/libs/langchain-google-common/src/tests/output_parsers.test.ts +++ b/libs/langchain-google-common/src/tests/output_parsers.test.ts @@ -214,4 +214,23 @@ describe("GoogleSearchOutputParsers", () => { expect(result).toEqual(expectation); }); + + test("non-grounded", async () => { + const record: Record = {}; + const projectId = mockId(); + const authOptions: MockClientAuthInfo = { + record, + projectId, + resultFile: "chat-1-mock.json", + }; + + const model = new ChatGoogle({ + authOptions, + modelName: "gemini-1.5-pro-002", + }); + const parser = new SimpleGoogleSearchOutputParser(); + const chain = model.pipe(parser); + const result = await chain.invoke("Flip a coin."); + expect(result).toEqual("T"); + }); });