-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgemini.go
More file actions
49 lines (38 loc) · 1.48 KB
/
gemini.go
File metadata and controls
49 lines (38 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Auto-generated by claw402 codegen — DO NOT EDIT
// Provider: Gemini (Google) (gemini)
package claw402
import (
"context"
"encoding/json"
)
// GeminiGemini provides methods for Gemini gemini endpoints.
type GeminiGemini struct {
client *Client
}
// Chat completions with Gemini 2.5 Pro (most powerful, 1M context) — $0.02/call
func (r *GeminiGemini) Chat25Pro(ctx context.Context, body map[string]interface{}) (json.RawMessage, error) {
return r.client.post(ctx, "/api/v1/ai/gemini/chat/2.5-pro", body)
}
// Chat completions with Gemini 2.5 Flash (best value) — $0.003/call
func (r *GeminiGemini) Chat25Flash(ctx context.Context, body map[string]interface{}) (json.RawMessage, error) {
return r.client.post(ctx, "/api/v1/ai/gemini/chat/2.5-flash", body)
}
// Chat completions with Gemini 2.5 Flash-Lite (fastest, cheapest) — $0.002/call
func (r *GeminiGemini) Chat25FlashLite(ctx context.Context, body map[string]interface{}) (json.RawMessage, error) {
return r.client.post(ctx, "/api/v1/ai/gemini/chat/2.5-flash-lite", body)
}
// List available Gemini models — $0.001/call
func (r *GeminiGemini) Models(ctx context.Context) (json.RawMessage, error) {
return r.client.get(ctx, "/api/v1/ai/gemini/models", nil)
}
// GeminiResource provides access to all Gemini (Google) API endpoints.
type GeminiResource struct {
client *Client
Gemini *GeminiGemini
}
func newGeminiResource(c *Client) *GeminiResource {
return &GeminiResource{
client: c,
Gemini: &GeminiGemini{client: c},
}
}