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

Add documentation for using other models, make it easier to use non OpenAI models #451

Merged
merged 3 commits into from
Jan 4, 2024

Conversation

PCSwingle
Copy link
Member

@PCSwingle PCSwingle commented Jan 4, 2024

Replaces #450. After discussing with @jakethekoenig, we feel this is a better alternative than using litellm directly in the codebase.

Pull Request Checklist

  • Documentation has been updated, or this change doesn't require that

@PCSwingle PCSwingle mentioned this pull request Jan 4, 2024
1 task
Copy link
Member

@jakethekoenig jakethekoenig left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks!

if not is_context_sufficient(tokens_used):
raise ContextSizeInsufficient()
Copy link
Member

Choose a reason for hiding this comment

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

Should we print something here so the user knows what the problem is?

Copy link
Member Author

Choose a reason for hiding this comment

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

We do print something in is_context_sufficient; maybe we should move the warning out of the function, but we do use it in multiple places.

@@ -70,9 +74,35 @@ You'll need to have API access to GPT-4 to run Mentat. There are a few options t

Mentat also works with the Azure OpenAI API. To use the Azure API, provide the `AZURE_OPENAI_ENDPOINT` (`https://<your-instance-name>.openai.azure.com/`) and `AZURE_OPENAI_KEY` environment variables instead of `OPENAI_API_KEY`.

In addition, Mentat uses the `gpt-4-1106-preview` by default. On Azure, this model is available under a different name: `gpt-4-1106-Preview` (with a capital P). To use it, override the default model as described in [configuration.md](docs/configuration.md).
In addition, Mentat uses the `gpt-4-1106-preview` model by default. When using Azure, you will have to set the model as described in [configuration.md](docs/configuration.md) to the name you gave your Azure model.
Copy link
Member

Choose a reason for hiding this comment

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

We should duplicate this to the user guide and remove it from the user guide when that's hosted. This is good for now though.

@PCSwingle PCSwingle merged commit 5f3d45c into main Jan 4, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants