Skip to content

Commit

Permalink
Update OpenAI models enum (#481)
Browse files Browse the repository at this point in the history
Update the model enums to include new OpenAI models.
  • Loading branch information
petersalas authored Nov 6, 2023
1 parent 220c40c commit e61c8ac
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/ai-jsx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": "fixie-ai/ai-jsx",
"bugs": "https://github.com/fixie-ai/ai-jsx/issues",
"homepage": "https://ai-jsx.com",
"version": "0.22.1",
"version": "0.23.0",
"volta": {
"extends": "../../package.json"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-jsx/src/core/completion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export type FunctionParameters = Record<string, PlainFunctionParameter> | z.ZodO
function AutomaticCompletionModel({ children, ...props }: ModelPropsWithChildren) {
if (getEnvVar('OPENAI_API_KEY', false) || getEnvVar('OPENAI_API_BASE', false)) {
return (
<OpenAICompletionModel model="text-davinci-003" {...props}>
<OpenAICompletionModel model="gpt-3.5-turbo-instruct" {...props}>
{children}
</OpenAICompletionModel>
);
Expand Down
7 changes: 5 additions & 2 deletions packages/ai-jsx/src/lib/openai.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export type ValidCompletionModel =
| 'text-davinci-002'
| 'text-curie-001'
| 'text-babbage-001'
| 'text-ada-001';
| 'text-ada-001'
| 'gpt-3.5-turbo-instruct';

export type ValidChatModel =
| 'gpt-4'
Expand All @@ -41,11 +42,13 @@ export type ValidChatModel =
| 'gpt-4-32k'
| 'gpt-4-32k-0314' // discontinue on 06/13/2024
| 'gpt-4-32k-0613'
| 'gpt-4-1106-preview'
| 'gpt-3.5-turbo'
| 'gpt-3.5-turbo-0301' // discontinue on 06/13/2024
| 'gpt-3.5-turbo-0613'
| 'gpt-3.5-turbo-16k'
| 'gpt-3.5-turbo-16k-0613';
| 'gpt-3.5-turbo-16k-0613'
| 'gpt-3.5-turbo-1106';

/**
* An OpenAI client that talks to the Azure OpenAI service.
Expand Down
6 changes: 5 additions & 1 deletion packages/docs/docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog

# 0.22.1
## 0.23.0

- Update the model enums in `ai-jsx/lib/openai`

## [0.22.1](https://github.com/fixie-ai/ai-jsx/commit/90370c40bccc779e5e49e830f917fd35bcbb87f1)

- In the OpenTelemetry logger, ensure that SeverityNumber is set.

Expand Down

4 comments on commit e61c8ac

@vercel
Copy link

@vercel vercel bot commented on e61c8ac Nov 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ai-jsx-voice – ./packages/voice

ai-jsx-voice.vercel.app
ai-jsx-voice-fixie-ai.vercel.app
ai-jsx-voice-git-main-fixie-ai.vercel.app
voice.fixie.ai

@vercel
Copy link

@vercel vercel bot commented on e61c8ac Nov 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ai-jsx-docs – ./packages/docs

ai-jsx-docs-fixie-ai.vercel.app
docs.ai-jsx.com
ai-jsx-docs.vercel.app
ai-jsx-docs-git-main-fixie-ai.vercel.app

@vercel
Copy link

@vercel vercel bot commented on e61c8ac Nov 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ai-jsx-nextjs-demo – ./packages/nextjs-demo

ai-jsx-nextjs-demo-fixie-ai.vercel.app
ai-jsx-nextjs-demo-git-main-fixie-ai.vercel.app
ai-jsx-nextjs-demo.vercel.app

@vercel
Copy link

@vercel vercel bot commented on e61c8ac Nov 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ai-jsx-tutorial-nextjs – ./packages/tutorial-nextjs

ai-jsx-tutorial-nextjs-fixie-ai.vercel.app
ai-jsx-tutorial-nextjs-git-main-fixie-ai.vercel.app
ai-jsx-tutorial-nextjs.vercel.app

Please sign in to comment.