-
Notifications
You must be signed in to change notification settings - Fork 181
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
Search grounding #271
Search grounding #271
Conversation
types/search-grounding.ts
Outdated
*/ | ||
export declare interface GoogleSearchRetrievalTool { | ||
/** | ||
* Google search retrival tool config. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "retrival" => "retrieval"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
/** | ||
* Google search retrival tool config. | ||
*/ | ||
googleSearchRetrieval?: GoogleSearchRetrieval; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are any of the properties in this document required? Just double checking because they're all currently marked as optional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see FunctionDeclarationsTool has functionDeclarations optional? So i guess that's ok. By default all proto auto generated field should be optional
types/search-grounding.ts
Outdated
*/ | ||
segment?: string; | ||
/** | ||
* A list of indices (into 'grounding_chunk') specifying the citations associated with the claim. For instance [1,3,4] means that grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved content attributed to the claim. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: break long comment lines to fit the 80-char line width limit, e.g.
/**
* A list of indices (into 'grounding_chunk') specifying the citations
* associated with the claim. For instance [1,3,4] means that
* grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the
* retrieved content attributed to the claim.
*/
Here and in other parts of this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
} | ||
|
||
/** | ||
* Retrieval tool that is powered by Google search. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mark all public interfaces with @public
(don't need to worry about tagging the properties, they will automatically be included)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
src/methods/generate-content.test.ts
Outdated
const makeRequestStub = stub(request, "makeModelRequest").resolves( | ||
mockResponse as Response, | ||
); | ||
const expectedGourdingMetadata = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: typo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
types/responses.ts
Outdated
@@ -163,6 +164,8 @@ export interface GenerateContentCandidate { | |||
avgLogprobs?: number; | |||
/** Log-likelihood scores for the response tokens and top tokens. */ | |||
logprobsResult?: LogprobsResult; | |||
/** Search gounding metadata. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: gounding => grounding
Add search grouding function feature for both stream/unary.