-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathassistants_test.go
68 lines (56 loc) · 1.39 KB
/
assistants_test.go
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
58
59
60
61
62
63
64
65
66
67
68
package minimax_test
import (
"context"
"fmt"
"testing"
"github.com/Twacqwq/go-minimax"
)
func TestListAssistants(t *testing.T) {
resp, err := client.ListAssistants(context.Background(), &minimax.AssistantListOption{Limit: 1})
if err != nil {
t.Fatal(err)
}
fmt.Printf("%+v\n", resp)
}
func TestCreateAssistants(t *testing.T) {
resp, err := client.CreateAssistants(context.Background(), &minimax.AssistantCreateRequest{
Model: minimax.Abab5Dot5,
Name: "apiass",
Instructions: "demo",
Description: "demo",
Tools: []*minimax.Tool{
{Typ: minimax.ToolCodeInterpreter},
{Typ: minimax.ToolWebSearch},
},
FileIds: []string{},
RoleMeta: &minimax.RoleMeta{
UserName: "Twac",
BotName: "Bot",
},
})
if err != nil {
t.Fatal(err)
}
fmt.Printf("%+v\n", resp)
}
func TestRetrieveAssistants(t *testing.T) {
resp, err := client.RetrieveAssistants(context.Background(), "asst_f75db16b622e45ff8b028307d77e81ef")
if err != nil {
t.Fatal(err)
}
fmt.Printf("%+v\n", resp.Assistant)
}
func TestDeleteAssistants(t *testing.T) {
resp, err := client.DeleteAssistants(context.Background(), "asst_f75db16b622e45ff8b028307d77e81ef")
if err != nil {
t.Fatal(err)
}
fmt.Printf("%+v\n", resp)
}
func TestListAssistantFiles(t *testing.T) {
resp, err := client.ListAssistantFiles(context.Background(), nil)
if err != nil {
t.Fatal(err)
}
fmt.Printf("%+v\n", resp)
}