Skip to content

Commit

Permalink
chore: use openai default model (AppFlowy-IO#4368)
Browse files Browse the repository at this point in the history
* chore: use openai default model

* feat: update openai mode
  • Loading branch information
LucasXu0 authored Jan 15, 2024
1 parent c8e9adb commit 595f1f6
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ enum OpenAIRequestType {
case OpenAIRequestType.textCompletion:
return Uri.parse('https://api.openai.com/v1/completions');
case OpenAIRequestType.textEdit:
return Uri.parse('https://api.openai.com/v1/edits');
return Uri.parse('https://api.openai.com/v1/v1/chat/completions');
case OpenAIRequestType.imageGenerations:
return Uri.parse('https://api.openai.com/v1/images/generations');
}
Expand Down Expand Up @@ -98,7 +98,7 @@ class HttpOpenAIRepository implements OpenAIRepository {
double temperature = 0.3,
}) async {
final parameters = {
'model': 'text-davinci-003',
'model': 'gpt-3.5-turbo-instruct',
'prompt': prompt,
'suffix': suffix,
'max_tokens': maxTokens,
Expand Down Expand Up @@ -138,7 +138,7 @@ class HttpOpenAIRepository implements OpenAIRepository {
bool useAction = false,
}) async {
final parameters = {
'model': 'text-davinci-003',
'model': 'gpt-3.5-turbo-instruct',
'prompt': prompt,
'suffix': suffix,
'max_tokens': maxTokens,
Expand Down Expand Up @@ -213,7 +213,7 @@ class HttpOpenAIRepository implements OpenAIRepository {
int n = 1,
}) async {
final parameters = {
'model': 'text-davinci-edit-001',
'model': 'gpt-4',
'input': input,
'instruction': instruction,
'temperature': temperature,
Expand Down

0 comments on commit 595f1f6

Please sign in to comment.