Skip to content

Commit

Permalink
Close #38 - Default to gpt-3.5-turbo-instruct
Browse files Browse the repository at this point in the history
Default OpenAI to gpt-3.5-turbo-instruct, which performs better and
returns decent results.
  • Loading branch information
w0rp committed Sep 22, 2023
1 parent 6993da2 commit 9cecb73
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion autoload/neural/config.vim
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ let s:defaults = {
\ 'api_key': '',
\ 'frequency_penalty': 0.1,
\ 'max_tokens': 1024,
\ 'model': 'text-davinci-003',
\ 'model': 'gpt-3.5-turbo-instruct',
\ 'presence_penalty': 0.1,
\ 'temperature': 0.2,
\ 'top_p': 1,
Expand Down
2 changes: 1 addition & 1 deletion doc/neural.txt
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ g:neural.source.openai.max_tokens *g:neural.source.openai.max_tokens*
g:neural.source.openai.model *g:neural.source.openai.model*
*vim.g.neural.source.openai.model*
Type: |String|
Default: `'text-davinci-003'`
Default: `'gpt-3.5-turbo-instruct'`

The model to use for OpenAI. Please consult OpenAI's documentation for more
information on models: https://platform.openai.com/docs/models/overview
Expand Down
10 changes: 5 additions & 5 deletions test/python/test_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ def test_main_function_rate_other_error():

def test_print_openai_results():
result_data = (
b'data: {"id": "cmpl-6jMlRJtbYTGrNwE6Lxy1Ns1EtD0is", "object": "text_completion", "created": 1676270285, "choices": [{"text": "\\n", "index": 0, "logprobs": null, "finish_reason": null}], "model": "text-davinci-003"}\n' # noqa
b'data: {"id": "cmpl-6jMlRJtbYTGrNwE6Lxy1Ns1EtD0is", "object": "text_completion", "created": 1676270285, "choices": [{"text": "\\n", "index": 0, "logprobs": null, "finish_reason": null}], "model": "gpt-3.5-turbo-instruct"}\n' # noqa
b'\n'
b'data: {"id": "cmpl-6jMlRJtbYTGrNwE6Lxy1Ns1EtD0is", "object": "text_completion", "created": 1676270285, "choices": [{"text": "\\n", "index": 0, "logprobs": null, "finish_reason": null}], "model": "text-davinci-003"}\n' # noqa
b'data: {"id": "cmpl-6jMlRJtbYTGrNwE6Lxy1Ns1EtD0is", "object": "text_completion", "created": 1676270285, "choices": [{"text": "\\n", "index": 0, "logprobs": null, "finish_reason": null}], "model": "gpt-3.5-turbo-instruct"}\n' # noqa
b'\n'
b'data: {"id": "cmpl-6jMlRJtbYTGrNwE6Lxy1Ns1EtD0is", "object": "text_completion", "created": 1676270285, "choices": [{"text": "Hello", "index": 0, "logprobs": null, "finish_reason": null}], "model": "text-davinci-003"}\n' # noqa
b'data: {"id": "cmpl-6jMlRJtbYTGrNwE6Lxy1Ns1EtD0is", "object": "text_completion", "created": 1676270285, "choices": [{"text": "Hello", "index": 0, "logprobs": null, "finish_reason": null}], "model": "gpt-3.5-turbo-instruct"}\n' # noqa
b'\n'
b'data: {"id": "cmpl-6jMlRJtbYTGrNwE6Lxy1Ns1EtD0is", "object": "text_completion", "created": 1676270285, "choices": [{"text": "!", "index": 0, "logprobs": null, "finish_reason": null}], "model": "text-davinci-003"}\n' # noqa
b'data: {"id": "cmpl-6jMlRJtbYTGrNwE6Lxy1Ns1EtD0is", "object": "text_completion", "created": 1676270285, "choices": [{"text": "!", "index": 0, "logprobs": null, "finish_reason": null}], "model": "gpt-3.5-turbo-instruct"}\n' # noqa
b'\n'
b'data: {"id": "cmpl-6jMlRJtbYTGrNwE6Lxy1Ns1EtD0is", "object": "text_completion", "created": 1676270285, "choices": [{"text": "", "index": 0, "logprobs": null, "finish_reason": "stop"}], "model": "text-davinci-003"}\n' # noqa
b'data: {"id": "cmpl-6jMlRJtbYTGrNwE6Lxy1Ns1EtD0is", "object": "text_completion", "created": 1676270285, "choices": [{"text": "", "index": 0, "logprobs": null, "finish_reason": "stop"}], "model": "gpt-3.5-turbo-instruct"}\n' # noqa
b'\n'
b'data: [DONE]\n'
b'\n'
Expand Down
2 changes: 1 addition & 1 deletion test/vim/test_config.vader
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Execute(The default openai settings should be correct):
\ 'api_key': '',
\ 'frequency_penalty': 0.1,
\ 'max_tokens': 1024,
\ 'model': 'text-davinci-003',
\ 'model': 'gpt-3.5-turbo-instruct',
\ 'presence_penalty': 0.1,
\ 'temperature': 0.2,
\ 'top_p': 1,
Expand Down

0 comments on commit 9cecb73

Please sign in to comment.