Skip to content

Commit 966ee68

Browse files
authored
Add New Optional Parameters to AssistantRequest Struct (#795)
* Add more parameters to support Assistant v2 * Add goimports
1 parent a7e9f0e commit 966ee68

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

assistant.go

+11-8
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,17 @@ type AssistantToolResource struct {
6262
// If Tools is empty slice it will effectively delete all of the Assistant's tools.
6363
// If Tools is populated, it will replace all of the existing Assistant's tools with the provided tools.
6464
type AssistantRequest struct {
65-
Model string `json:"model"`
66-
Name *string `json:"name,omitempty"`
67-
Description *string `json:"description,omitempty"`
68-
Instructions *string `json:"instructions,omitempty"`
69-
Tools []AssistantTool `json:"-"`
70-
FileIDs []string `json:"file_ids,omitempty"`
71-
Metadata map[string]any `json:"metadata,omitempty"`
72-
ToolResources *AssistantToolResource `json:"tool_resources,omitempty"`
65+
Model string `json:"model"`
66+
Name *string `json:"name,omitempty"`
67+
Description *string `json:"description,omitempty"`
68+
Instructions *string `json:"instructions,omitempty"`
69+
Tools []AssistantTool `json:"-"`
70+
FileIDs []string `json:"file_ids,omitempty"`
71+
Metadata map[string]any `json:"metadata,omitempty"`
72+
ToolResources *AssistantToolResource `json:"tool_resources,omitempty"`
73+
ResponseFormat any `json:"response_format,omitempty"`
74+
Temperature *float32 `json:"temperature,omitempty"`
75+
TopP *float32 `json:"top_p,omitempty"`
7376
}
7477

7578
// MarshalJSON provides a custom marshaller for the assistant request to handle the API use cases

0 commit comments

Comments
 (0)