Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
afirstenberg committed Jan 9, 2025
1 parent 7cbc8a6 commit f2519b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion libs/langchain-google-common/src/output_parsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ export class SimpleGoogleSearchOutputParser extends BaseGoogleSearchOutputParser

protected textSuffix(_text: string, grounding: GroundingInfo): string {
let ret = "\n";
const chunks: GeminiGroundingChunk[] = grounding?.metadata?.groundingChunks ??[];
const chunks: GeminiGroundingChunk[] =
grounding?.metadata?.groundingChunks ?? [];
chunks.forEach((chunk, index) => {
ret = `${ret}${this.chunkToString(chunk, index)}\n`;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,5 +232,5 @@ describe("GoogleSearchOutputParsers", () => {
const chain = model.pipe(parser);
const result = await chain.invoke("Flip a coin.");
expect(result).toEqual("T");
})
});
});

0 comments on commit f2519b6

Please sign in to comment.