You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-services/openai/assistants-reference.md
+56Lines changed: 56 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,62 @@ Create an assistant with a model and instructions.
42
42
| response_format | string or object | Optional | Specifies the format that the model must output. Compatible with GPT-4 Turbo and all GPT-3.5 Turbo models since gpt-3.5-turbo-1106. Setting this parameter to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is valid JSON. Importantly, when using JSON mode, you must also instruct the model to produce JSON yourself using a system or user message. Without this instruction, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Additionally, the message content may be partially cut off if you use `finish_reason="length"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length. |
43
43
| tool_resources | object | Optional | A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. |
44
44
45
+
### response_format types
46
+
47
+
**string**
48
+
49
+
`auto` is the default value.
50
+
51
+
**object**
52
+
53
+
Possible `type` values: `text`, `json_object`, `json_schema`.
54
+
55
+
***json_schema***
56
+
57
+
| Name | Type | Description | Default | Required/Optional |
58
+
|--- |--- |--- |--- |--- |
59
+
|`description`| string | A description of what the response format is for, used by the model to determine how to respond in the format. || Optional |
60
+
|`name`| string | The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. || Required |
61
+
|`schema`| object | The schema for the response format, described as a JSON Schema object. || Optional |
62
+
|`strict`| boolean or null | Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. | false | Optional |
63
+
64
+
### tool_resources properties
65
+
66
+
**code_interpreter**
67
+
68
+
| Name | Type | Description | Default |
69
+
|--- |--- |--- |--- |
70
+
|`file_ids`| array | A list of file IDs made available to the code_interpreter tool. There can be a maximum of 20 files associated with the tool. |`[]`|
71
+
72
+
**file_search**
73
+
74
+
| Name | Type | Description | Required/Optional |
75
+
|--- |--- |--- |--- |
76
+
|`vector_store_ids`| array | The vector store attached to this thread. There can be a maximum of 1 vector store attached to the thread. | Optional |
77
+
|`vector_stores`| array | A helper to create a vector store with file_ids and attach it to this thread. There can be a maximum of 1 vector store attached to the thread. | Optional |
78
+
79
+
***vector_stores***
80
+
81
+
| Name | Type | Description | Required/Optional |
82
+
|--- |--- |--- |--- |
83
+
|`file_ids`| array | A list of file IDs to add to the vector store. There can be a maximum of 10000 files in a vector store. | Optional |
84
+
|`chunking_strategy`| object | The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. | Optional |
85
+
|`metadata`| map | Set of 16 key-value pairs that can be attached to a vector store. This can be useful for storing additional information about the vector store in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. | Optional |
86
+
87
+
***chunking_strategy***
88
+
89
+
| Name | Type | Description | Required/optional |
90
+
|--- |--- |--- |---|
91
+
|`Auto Chunking Strategy`| object | The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`. `type` is always `auto`| Required |
|`max_chunk_size_tokens`| integer | The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`. | Required |
99
+
|`chunk_overlap_tokens`| integer | The number of tokens that overlap between chunks. The default value is `400`. Note that the overlap must not exceed half of `max_chunk_size_tokens`. | Required |
0 commit comments