-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathstructs.go
More file actions
62 lines (52 loc) · 1.66 KB
/
Copy pathstructs.go
File metadata and controls
62 lines (52 loc) · 1.66 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
58
59
60
61
62
package chat
type Output struct {
Message *Message `json:"message"`
LogLevel string `json:"log_level"`
}
type Message struct {
Role string `json:"role"`
Content string `json:"content"`
Name string `json:"name,omitempty"`
FunctionCall *ChatMessageFunctionCall `json:"function_call,omitempty"`
Confirmation *Confirmation `json:"copilot_confirmation"`
References []Reference `json:"copilot_references"`
Errors []CopilotError `json:"copilot_errors"`
}
type Completion struct {
Choices []CompletionChoice `json:"choices"`
}
type CompletionChoice struct {
Delta Message `json:"delta"`
}
type Request struct {
CopilotThreadID string `json:"copilot_thread_id"`
Messages []Message `json:"messages"`
Agent string `json:"agent"`
}
type ChatMessageFunctionCall struct {
Name string `json:"name"`
Arguments string `json:"arguments"`
}
type Confirmation struct {
Type string `json:"type"`
Title string `json:"title"`
Message string `json:"message"`
Confirmation any `json:"confirmation"`
}
type Reference struct {
Type string `json:"type"`
ID string `json:"id"`
Data any `json:"data"`
Metadata ReferenceMetadata `json:"metadata"`
}
type ReferenceMetadata struct {
DisplayName string `json:"display_name"`
DisplayIcon string `json:"display_icon"`
DisplayURL string `json:"display_url"`
}
type CopilotError struct {
Type string `json:"type"`
Code string `json:"code"`
Message string `json:"message"`
Identifier string `json:"identifier"`
}