-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add preliminary search grouding change without unittest. * Add support for stream generating content * Generate doc and change set. * Resolve comment
- Loading branch information
Showing
53 changed files
with
1,175 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@google/generative-ai": minor | ||
--- | ||
|
||
Add search grounding feature to SDK. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@google/generative-ai": minor | ||
--- | ||
|
||
Add support for search grounding |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
docs/reference/main/generative-ai.dynamicretrievalconfig.dynamicthreshold.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@google/generative-ai](./generative-ai.md) > [DynamicRetrievalConfig](./generative-ai.dynamicretrievalconfig.md) > [dynamicThreshold](./generative-ai.dynamicretrievalconfig.dynamicthreshold.md) | ||
|
||
## DynamicRetrievalConfig.dynamicThreshold property | ||
|
||
The threshold to be used in dynamic retrieval. If not set, a system default value is used. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
dynamicThreshold?: number; | ||
``` |
21 changes: 21 additions & 0 deletions
21
docs/reference/main/generative-ai.dynamicretrievalconfig.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@google/generative-ai](./generative-ai.md) > [DynamicRetrievalConfig](./generative-ai.dynamicretrievalconfig.md) | ||
|
||
## DynamicRetrievalConfig interface | ||
|
||
Specifies the dynamic retrieval configuration for the given source. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
export declare interface DynamicRetrievalConfig | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Modifiers | Type | Description | | ||
| --- | --- | --- | --- | | ||
| [dynamicThreshold?](./generative-ai.dynamicretrievalconfig.dynamicthreshold.md) | | number | _(Optional)_ The threshold to be used in dynamic retrieval. If not set, a system default value is used. | | ||
| [mode?](./generative-ai.dynamicretrievalconfig.mode.md) | | [DynamicRetrievalMode](./generative-ai.dynamicretrievalmode.md) | _(Optional)_ The mode of the predictor to be used in dynamic retrieval. | | ||
|
13 changes: 13 additions & 0 deletions
13
docs/reference/main/generative-ai.dynamicretrievalconfig.mode.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@google/generative-ai](./generative-ai.md) > [DynamicRetrievalConfig](./generative-ai.dynamicretrievalconfig.md) > [mode](./generative-ai.dynamicretrievalconfig.mode.md) | ||
|
||
## DynamicRetrievalConfig.mode property | ||
|
||
The mode of the predictor to be used in dynamic retrieval. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
mode?: DynamicRetrievalMode; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@google/generative-ai](./generative-ai.md) > [DynamicRetrievalMode](./generative-ai.dynamicretrievalmode.md) | ||
|
||
## DynamicRetrievalMode enum | ||
|
||
The mode of the predictor to be used in dynamic retrieval. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
export declare enum DynamicRetrievalMode | ||
``` | ||
|
||
## Enumeration Members | ||
|
||
| Member | Value | Description | | ||
| --- | --- | --- | | ||
| MODE\_DYNAMIC | <code>"MODE_DYNAMIC"</code> | | | ||
| MODE\_UNSPECIFIED | <code>"MODE_UNSPECIFIED"</code> | | | ||
|
13 changes: 13 additions & 0 deletions
13
docs/reference/main/generative-ai.generatecontentcandidate.groundingmetadata.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@google/generative-ai](./generative-ai.md) > [GenerateContentCandidate](./generative-ai.generatecontentcandidate.md) > [groundingMetadata](./generative-ai.generatecontentcandidate.groundingmetadata.md) | ||
|
||
## GenerateContentCandidate.groundingMetadata property | ||
|
||
Search grounding metadata. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
groundingMetadata?: GroundingMetadata; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
docs/reference/main/generative-ai.googlesearchretrieval.dynamicretrievalconfig.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@google/generative-ai](./generative-ai.md) > [GoogleSearchRetrieval](./generative-ai.googlesearchretrieval.md) > [dynamicRetrievalConfig](./generative-ai.googlesearchretrieval.dynamicretrievalconfig.md) | ||
|
||
## GoogleSearchRetrieval.dynamicRetrievalConfig property | ||
|
||
Specifies the dynamic retrieval configuration for the given source. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
dynamicRetrievalConfig?: DynamicRetrievalConfig; | ||
``` |
20 changes: 20 additions & 0 deletions
20
docs/reference/main/generative-ai.googlesearchretrieval.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@google/generative-ai](./generative-ai.md) > [GoogleSearchRetrieval](./generative-ai.googlesearchretrieval.md) | ||
|
||
## GoogleSearchRetrieval interface | ||
|
||
Retrieval tool that is powered by Google search. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
export declare interface GoogleSearchRetrieval | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Modifiers | Type | Description | | ||
| --- | --- | --- | --- | | ||
| [dynamicRetrievalConfig?](./generative-ai.googlesearchretrieval.dynamicretrievalconfig.md) | | [DynamicRetrievalConfig](./generative-ai.dynamicretrievalconfig.md) | _(Optional)_ Specifies the dynamic retrieval configuration for the given source. | | ||
|
13 changes: 13 additions & 0 deletions
13
...reference/main/generative-ai.googlesearchretrievaltool.googlesearchretrieval.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@google/generative-ai](./generative-ai.md) > [GoogleSearchRetrievalTool](./generative-ai.googlesearchretrievaltool.md) > [googleSearchRetrieval](./generative-ai.googlesearchretrievaltool.googlesearchretrieval.md) | ||
|
||
## GoogleSearchRetrievalTool.googleSearchRetrieval property | ||
|
||
Google search retrieval tool config. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
googleSearchRetrieval?: GoogleSearchRetrieval; | ||
``` |
20 changes: 20 additions & 0 deletions
20
docs/reference/main/generative-ai.googlesearchretrievaltool.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@google/generative-ai](./generative-ai.md) > [GoogleSearchRetrievalTool](./generative-ai.googlesearchretrievaltool.md) | ||
|
||
## GoogleSearchRetrievalTool interface | ||
|
||
Retrieval tool that is powered by Google search. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
export declare interface GoogleSearchRetrievalTool | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Modifiers | Type | Description | | ||
| --- | --- | --- | --- | | ||
| [googleSearchRetrieval?](./generative-ai.googlesearchretrievaltool.googlesearchretrieval.md) | | [GoogleSearchRetrieval](./generative-ai.googlesearchretrieval.md) | _(Optional)_ Google search retrieval tool config. | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@google/generative-ai](./generative-ai.md) > [GroundingChunk](./generative-ai.groundingchunk.md) | ||
|
||
## GroundingChunk interface | ||
|
||
Grounding chunk. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
export declare interface GroundingChunk | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Modifiers | Type | Description | | ||
| --- | --- | --- | --- | | ||
| [web?](./generative-ai.groundingchunk.web.md) | | [GroundingChunkWeb](./generative-ai.groundingchunkweb.md) | _(Optional)_ Chunk from the web. | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@google/generative-ai](./generative-ai.md) > [GroundingChunk](./generative-ai.groundingchunk.md) > [web](./generative-ai.groundingchunk.web.md) | ||
|
||
## GroundingChunk.web property | ||
|
||
Chunk from the web. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
web?: GroundingChunkWeb; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@google/generative-ai](./generative-ai.md) > [GroundingChunkWeb](./generative-ai.groundingchunkweb.md) | ||
|
||
## GroundingChunkWeb interface | ||
|
||
Chunk from the web. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
export declare interface GroundingChunkWeb | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Modifiers | Type | Description | | ||
| --- | --- | --- | --- | | ||
| [title?](./generative-ai.groundingchunkweb.title.md) | | string | _(Optional)_ Title of the chunk. | | ||
| [uri?](./generative-ai.groundingchunkweb.uri.md) | | string | _(Optional)_ URI reference of the chunk. | | ||
|
13 changes: 13 additions & 0 deletions
13
docs/reference/main/generative-ai.groundingchunkweb.title.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@google/generative-ai](./generative-ai.md) > [GroundingChunkWeb](./generative-ai.groundingchunkweb.md) > [title](./generative-ai.groundingchunkweb.title.md) | ||
|
||
## GroundingChunkWeb.title property | ||
|
||
Title of the chunk. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
title?: string; | ||
``` |
13 changes: 13 additions & 0 deletions
13
docs/reference/main/generative-ai.groundingchunkweb.uri.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@google/generative-ai](./generative-ai.md) > [GroundingChunkWeb](./generative-ai.groundingchunkweb.md) > [uri](./generative-ai.groundingchunkweb.uri.md) | ||
|
||
## GroundingChunkWeb.uri property | ||
|
||
URI reference of the chunk. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
uri?: string; | ||
``` |
Oops, something went wrong.