Skip to content

Commit a5bce4e

Browse files
committed
docs: update Gemini model and enhance integration documentation
- Update Gemini model example from gemini-1.5-flash-latest to gemini-2.0-flash - Add a Mermaid sequence diagram illustrating the interaction flow between the user, Gemini client, and Google GenAI API in Gemini integration documentation (including Chinese and Taiwanese localizations) Signed-off-by: appleboy <[email protected]>
1 parent 3e76cf1 commit a5bce4e

File tree

3 files changed

+54
-3
lines changed

3 files changed

+54
-3
lines changed

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,13 +240,30 @@ Build with the Gemini API, you can see the [Gemini API documentation][61]. Updat
240240
```sh
241241
codegpt config set openai.provider gemini
242242
codegpt config set openai.api_key xxxxxxx
243-
codegpt config set openai.model gemini-1.5-flash-latest
243+
codegpt config set openai.model gemini-2.0-flash
244244
```
245245

246246
[60]: https://ai.google.dev/gemini-api
247247
[61]: https://ai.google.dev/gemini-api/docs
248248
[62]: https://aistudio.google.com/app/apikey
249249

250+
```mermaid
251+
sequenceDiagram
252+
participant User
253+
participant GeminiClient as Gemini Provider
254+
participant GenAI as Google GenAI API
255+
256+
User->>GeminiClient: Completion(ctx, content)
257+
GeminiClient->>GenAI: GenerateContent(model, content, config)
258+
GenAI-->>GeminiClient: Response (text, usage metadata)
259+
GeminiClient-->>User: core.Response (text, usage)
260+
261+
User->>GeminiClient: GetSummaryPrefix(ctx, content)
262+
GeminiClient->>GenAI: GenerateContent(model, content, config with function call)
263+
GenAI-->>GeminiClient: Response (function call result)
264+
GeminiClient-->>User: core.Response (prefix or error)
265+
```
266+
250267
### Support for [Anthropic][100] API Service
251268

252269
Build with the Anthropic API, you can see the [Anthropic API documentation][101]. Update the `provider` and `api_key` in your config file. Please create an API key from the [Anthropic API][102] page.

README.zh-cn.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,24 @@ codegpt config set openai.model xxxxx-gpt-4o
228228
```sh
229229
codegpt config set openai.provider gemini
230230
codegpt config set openai.api_key xxxxxxx
231-
codegpt config set openai.model gemini-1.5-flash-latest
231+
codegpt config set openai.model gemini-2.0-flash
232+
```
233+
234+
```mermaid
235+
sequenceDiagram
236+
participant User
237+
participant GeminiClient as Gemini Provider
238+
participant GenAI as Google GenAI API
239+
240+
User->>GeminiClient: Completion(ctx, content)
241+
GeminiClient->>GenAI: GenerateContent(model, content, config)
242+
GenAI-->>GeminiClient: Response (text, usage metadata)
243+
GeminiClient-->>User: core.Response (text, usage)
244+
245+
User->>GeminiClient: GetSummaryPrefix(ctx, content)
246+
GeminiClient->>GenAI: GenerateContent(model, content, config with function call)
247+
GenAI-->>GeminiClient: Response (function call result)
248+
GeminiClient-->>User: core.Response (prefix or error)
232249
```
233250

234251
[60]: https://ai.google.dev/gemini-api

README.zh-tw.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,24 @@ codegpt config set openai.model xxxxx-gpt-4o
239239
```sh
240240
codegpt config set openai.provider gemini
241241
codegpt config set openai.api_key xxxxxxx
242-
codegpt config set openai.model gemini-1.5-flash-latest
242+
codegpt config set openai.model gemini-2.0-flash
243+
```
244+
245+
```mermaid
246+
sequenceDiagram
247+
participant User
248+
participant GeminiClient as Gemini Provider
249+
participant GenAI as Google GenAI API
250+
251+
User->>GeminiClient: Completion(ctx, content)
252+
GeminiClient->>GenAI: GenerateContent(model, content, config)
253+
GenAI-->>GeminiClient: Response (text, usage metadata)
254+
GeminiClient-->>User: core.Response (text, usage)
255+
256+
User->>GeminiClient: GetSummaryPrefix(ctx, content)
257+
GeminiClient->>GenAI: GenerateContent(model, content, config with function call)
258+
GenAI-->>GeminiClient: Response (function call result)
259+
GeminiClient-->>User: core.Response (prefix or error)
243260
```
244261

245262
[60]: https://ai.google.dev/gemini-api

0 commit comments

Comments
 (0)