Skip to content

Instantly share code, notes, and snippets.

@adrienbrault
Created December 13, 2023 13:05
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save adrienbrault/a9217476f067acf2c243d0d8731cec17 to your computer and use it in GitHub Desktop.
Save adrienbrault/a9217476f067acf2c243d0d8731cec17 to your computer and use it in GitHub Desktop.

Here is how to use @MistralAI experimental Mistral-medium using @simonw's https://llm.datasette.io CLI:

  1. Edit the OpenAI-compatible models configuration file:
vi "$(dirname "$(llm logs path)")"/extra-openai-models.yaml
  1. Add the following and save:
- model_id: mistral-tiny
  model_name: mistral-tiny
  api_base: "https://api.mistral.ai/v1"
  api_key_name: mistral
- model_id: mistral-small
  model_name: mistral-small
  api_base: "https://api.mistral.ai/v1"
  api_key_name: mistral
- model_id: mistral-medium
  model_name: mistral-medium
  api_base: "https://api.mistral.ai/v1"
  api_key_name: mistral
  1. Create a mistral API Key https://console.mistral.ai/users/api-keys/

  2. Configure LLM with the api key:

llm keys set mistral
  1. Profit:
llm -m mistral-medium "Hello"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment