List assistants
Deprecated
client.Beta.Assistants.List(ctx, query) (*CursorPage[Assistant], error)
GET/assistants
Returns a list of assistants.
Parameters
Returns
List assistants
package main
import (
"context"
"fmt"
"github.com/openai/openai-go"
"github.com/openai/openai-go/option"
)
func main() {
client := openai.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.Beta.Assistants.List(context.TODO(), openai.BetaAssistantListParams{
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
{
"data": [
{
"id": "id",
"created_at": 0,
"description": "description",
"instructions": "instructions",
"metadata": {
"foo": "string"
},
"model": "model",
"name": "name",
"object": "assistant",
"tools": [
{
"type": "code_interpreter"
}
],
"response_format": "auto",
"temperature": 1,
"tool_resources": {
"code_interpreter": {
"file_ids": [
"string"
]
},
"file_search": {
"vector_store_ids": [
"string"
]
}
},
"top_p": 1
}
],
"first_id": "asst_abc123",
"has_more": false,
"last_id": "asst_abc456",
"object": "list"
}Returns Examples
{
"data": [
{
"id": "id",
"created_at": 0,
"description": "description",
"instructions": "instructions",
"metadata": {
"foo": "string"
},
"model": "model",
"name": "name",
"object": "assistant",
"tools": [
{
"type": "code_interpreter"
}
],
"response_format": "auto",
"temperature": 1,
"tool_resources": {
"code_interpreter": {
"file_ids": [
"string"
]
},
"file_search": {
"vector_store_ids": [
"string"
]
}
},
"top_p": 1
}
],
"first_id": "asst_abc123",
"has_more": false,
"last_id": "asst_abc456",
"object": "list"
}