GPT API: Difference between revisions
No edit summary |
(→model) |
||
Line 3: | Line 3: | ||
==Request Fields== | ==Request Fields== | ||
===model=== | ===model=== | ||
<pre> | |||
model: "gpt-3.5-turbo" | |||
</prev> | |||
The value for the model field is a string that contains the name of the [[GPT]] [[model]] you want to use. | |||
The value for the model field can have up to 3 components: | |||
<pre> | |||
model: "gpt-3.5-turbo-16k-0613" | |||
</prev> | |||
In the example above, the '''gpt-3.5-turbo''' is the name of the model. The '''16k''' is the [[context length]] in [[tokens]]. The '''0613''' is the date when the model [[snapshot]] is taken, which is June 13th. | |||
'''Model Names:''' | |||
'''Context Window (# of Tokens)''' | |||
{| class="wikitable" | |||
|- | |||
! Model | |||
! Context Window | |||
|- | |||
| gpt-3.5-turbo | |||
| 4,096 tokens | |||
|- | |||
| gpt-3.5-turbo-16k | |||
| 16,384 tokens | |||
|- | |||
| gpt-4 | |||
| 8,192 tokens | |||
|- | |||
| gpt-4-32k | |||
| 32,768 tokens | |||
|} | |||
===messages=== | ===messages=== |
Revision as of 19:08, 15 July 2023
Documentation and Guide for OpenAI's GPT API.
Request Fields
model
model: "gpt-3.5-turbo" </prev> The value for the model field is a string that contains the name of the GPT model you want to use. The value for the model field can have up to 3 components:model: "gpt-3.5-turbo-16k-0613" </prev> In the example above, the gpt-3.5-turbo is the name of the model. The 16k is the context length in tokens. The 0613 is the date when the model snapshot is taken, which is June 13th. Model Names: Context Window (# of Tokens)
Model | Context Window |
---|---|
gpt-3.5-turbo | 4,096 tokens |
gpt-3.5-turbo-16k | 16,384 tokens |
gpt-4 | 8,192 tokens |
gpt-4-32k | 32,768 tokens |