mirror of
https://github.com/Hopiu/llm.git
synced 2026-03-16 20:50:25 +00:00
Add GPT-4.1 model family to default OpenAI plugin (#965)
* openai: add gpt-4.1 models * Refactor and run cog --------- Co-authored-by: Simon Willison <swillison@gmail.com>
This commit is contained in:
parent
7dcfa31143
commit
0b37123a38
4 changed files with 73 additions and 0 deletions
|
|
@ -22,6 +22,9 @@ cog.out("```\n{}```".format(result.output))
|
|||
4o : gpt-4o
|
||||
chatgpt-4o : chatgpt-4o-latest
|
||||
4o-mini : gpt-4o-mini
|
||||
4.1 : gpt-4.1
|
||||
4.1-mini : gpt-4.1-mini
|
||||
4.1-nano : gpt-4.1-nano
|
||||
3.5 : gpt-3.5-turbo
|
||||
chatgpt : gpt-3.5-turbo
|
||||
chatgpt-16k : gpt-3.5-turbo-16k
|
||||
|
|
|
|||
|
|
@ -39,6 +39,9 @@ OpenAI Chat: gpt-4o-audio-preview-2024-12-17
|
|||
OpenAI Chat: gpt-4o-audio-preview-2024-10-01
|
||||
OpenAI Chat: gpt-4o-mini-audio-preview
|
||||
OpenAI Chat: gpt-4o-mini-audio-preview-2024-12-17
|
||||
OpenAI Chat: gpt-4.1 (aliases: 4.1)
|
||||
OpenAI Chat: gpt-4.1-mini (aliases: 4.1-mini)
|
||||
OpenAI Chat: gpt-4.1-nano (aliases: 4.1-nano)
|
||||
OpenAI Chat: gpt-3.5-turbo (aliases: 3.5, chatgpt)
|
||||
OpenAI Chat: gpt-3.5-turbo-16k (aliases: chatgpt-16k, 3.5-16k)
|
||||
OpenAI Chat: gpt-4 (aliases: 4, gpt4)
|
||||
|
|
|
|||
|
|
@ -587,6 +587,66 @@ OpenAI Chat: gpt-4o-mini-audio-preview-2024-12-17
|
|||
Keys:
|
||||
key: openai
|
||||
env_var: OPENAI_API_KEY
|
||||
OpenAI Chat: gpt-4.1 (aliases: 4.1)
|
||||
Options:
|
||||
temperature: float
|
||||
max_tokens: int
|
||||
top_p: float
|
||||
frequency_penalty: float
|
||||
presence_penalty: float
|
||||
stop: str
|
||||
logit_bias: dict, str
|
||||
seed: int
|
||||
json_object: boolean
|
||||
Attachment types:
|
||||
application/pdf, image/gif, image/jpeg, image/png, image/webp
|
||||
Features:
|
||||
- streaming
|
||||
- schemas
|
||||
- async
|
||||
Keys:
|
||||
key: openai
|
||||
env_var: OPENAI_API_KEY
|
||||
OpenAI Chat: gpt-4.1-mini (aliases: 4.1-mini)
|
||||
Options:
|
||||
temperature: float
|
||||
max_tokens: int
|
||||
top_p: float
|
||||
frequency_penalty: float
|
||||
presence_penalty: float
|
||||
stop: str
|
||||
logit_bias: dict, str
|
||||
seed: int
|
||||
json_object: boolean
|
||||
Attachment types:
|
||||
application/pdf, image/gif, image/jpeg, image/png, image/webp
|
||||
Features:
|
||||
- streaming
|
||||
- schemas
|
||||
- async
|
||||
Keys:
|
||||
key: openai
|
||||
env_var: OPENAI_API_KEY
|
||||
OpenAI Chat: gpt-4.1-nano (aliases: 4.1-nano)
|
||||
Options:
|
||||
temperature: float
|
||||
max_tokens: int
|
||||
top_p: float
|
||||
frequency_penalty: float
|
||||
presence_penalty: float
|
||||
stop: str
|
||||
logit_bias: dict, str
|
||||
seed: int
|
||||
json_object: boolean
|
||||
Attachment types:
|
||||
application/pdf, image/gif, image/jpeg, image/png, image/webp
|
||||
Features:
|
||||
- streaming
|
||||
- schemas
|
||||
- async
|
||||
Keys:
|
||||
key: openai
|
||||
env_var: OPENAI_API_KEY
|
||||
OpenAI Chat: gpt-3.5-turbo (aliases: 3.5, chatgpt)
|
||||
Options:
|
||||
temperature: float
|
||||
|
|
|
|||
|
|
@ -49,6 +49,13 @@ def register_models(register):
|
|||
Chat(audio_model_id, audio=True),
|
||||
AsyncChat(audio_model_id, audio=True),
|
||||
)
|
||||
# GPT-4.1
|
||||
for model_id in ("gpt-4.1", "gpt-4.1-mini", "gpt-4.1-nano"):
|
||||
register(
|
||||
Chat(model_id, vision=True, supports_schema=True),
|
||||
AsyncChat(model_id, vision=True, supports_schema=True),
|
||||
aliases=(model_id.replace("gpt-", ""),),
|
||||
)
|
||||
# 3.5 and 4
|
||||
register(
|
||||
Chat("gpt-3.5-turbo"), AsyncChat("gpt-3.5-turbo"), aliases=("3.5", "chatgpt")
|
||||
|
|
|
|||
Loading…
Reference in a new issue