Skip to content

Math-Vov13/Mistral-X_FastAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mistral-X API

⚠️ Before start, please notice :
I fully respect the work of the MistralAI team,
and I'm not saying that my API is better or anything.
It's just a complement with my ideas that I propose to add.

📚 About the project

MistralAI-X logo

I'd like to introduce you "Mistral-X API", an API with new features compared to the official.
and with my personal touch ♥

Features:

  • Save Session History
  • Token auth
  • Response Streaming
  • Fine-tuning ?

💡 Documentation:

See all endpoints here

See how to host the API here

See how to create your database here


And btw, this is my first API using FastAPI... :D


⚡ Quick Start

I recommend you to create a virtual environment first

python -m venv .venv


Launch your API in a few steps! :

1. Install dependencies

pip install -r requirements.txt

or, if you use Poetry:

poetry install


2. Create a .env file
This file must contain :

# go to : https://console.mistral.ai/api-keys/
# and generate an API Key

MISTRAL_API_KEY = "<mistral-api-key>"
SECRET_KEY = "<secret-key>"

To generate a secret key:

  1. if you have openssl already installed:
openssl rand -hex 32
  1. else:
    write random chars lmao


3. Finally, run uvicorn server

uvicorn main:app --reload

or, with Poetry:

poetry run uvicorn main:app --reload

📜 License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published