Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support fine tuned Openai model selections #277

Merged
merged 1 commit into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion paperqa/llms.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def guess_model_type(model_name: str) -> str: # noqa: PLR0911


def is_openai_model(model_name) -> bool:
return model_name.startswith(("gpt-", "babbage", "davinci"))
return model_name.startswith(("gpt-", "babbage", "davinci", "ft:gpt-"))


def process_llm_config(
Expand Down
1 change: 1 addition & 0 deletions tests/test_paperqa.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def test_is_openai_model():
assert is_openai_model("babbage-002")
assert is_openai_model("gpt-4-1106-preview")
assert is_openai_model("davinci-002")
assert is_openai_model("ft:gpt-3.5-turbo-0125:my-org::ABC123")
assert not is_openai_model("llama")
assert not is_openai_model("labgpt")
assert not is_openai_model("mixtral-7B")
Expand Down