-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqwen.go
More file actions
59 lines (46 loc) · 1.91 KB
/
Copy pathqwen.go
File metadata and controls
59 lines (46 loc) · 1.91 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
48
49
50
51
52
53
54
55
56
57
// Auto-generated by claw402 codegen — DO NOT EDIT
// Provider: Qwen (通义千问) (qwen)
package claw402
import (
"context"
"encoding/json"
)
// QwenQwen provides methods for Qwen qwen endpoints.
type QwenQwen struct {
client *Client
}
// Chat completions with Qwen3-Max (flagship, most powerful) — $0.01/call
func (r *QwenQwen) ChatMax(ctx context.Context, body map[string]interface{}) (json.RawMessage, error) {
return r.client.post(ctx, "/api/v1/ai/qwen/chat/max", body)
}
// Chat completions with Qwen-Plus (best value) — $0.005/call
func (r *QwenQwen) ChatPlus(ctx context.Context, body map[string]interface{}) (json.RawMessage, error) {
return r.client.post(ctx, "/api/v1/ai/qwen/chat/plus", body)
}
// Chat completions with Qwen-Turbo (fast response) — $0.002/call
func (r *QwenQwen) ChatTurbo(ctx context.Context, body map[string]interface{}) (json.RawMessage, error) {
return r.client.post(ctx, "/api/v1/ai/qwen/chat/turbo", body)
}
// Chat completions with Qwen-Flash (ultra-low latency, cheapest) — $0.002/call
func (r *QwenQwen) ChatFlash(ctx context.Context, body map[string]interface{}) (json.RawMessage, error) {
return r.client.post(ctx, "/api/v1/ai/qwen/chat/flash", body)
}
// Code generation with Qwen3-Coder-Plus — $0.005/call
func (r *QwenQwen) ChatCoder(ctx context.Context, body map[string]interface{}) (json.RawMessage, error) {
return r.client.post(ctx, "/api/v1/ai/qwen/chat/coder", body)
}
// Multimodal vision understanding with Qwen-VL-Plus (image + text) — $0.005/call
func (r *QwenQwen) ChatVl(ctx context.Context, body map[string]interface{}) (json.RawMessage, error) {
return r.client.post(ctx, "/api/v1/ai/qwen/chat/vl", body)
}
// QwenResource provides access to all Qwen (通义千问) API endpoints.
type QwenResource struct {
client *Client
Qwen *QwenQwen
}
func newQwenResource(c *Client) *QwenResource {
return &QwenResource{
client: c,
Qwen: &QwenQwen{client: c},
}
}