1 stable release
1.1.4 | Jun 16, 2024 |
---|
#1597 in Network programming
170KB
2.5K
SLoC
Mistral Rouille
Mistral Rouille is a Rust crate customized from Mistral's official OpenAPI specification. This crate provides a convenient and type-safe interface for interacting with Mistral's API, using the Reqwest crate for HTTP requests. Designed to be easily integrated into your Rust projects, Mistral Rouille offers robust functionality for all Mistral API endpoints, ensuring seamless communication with the configured endpoint.
Overview
This API client was generated by the OpenAPI Generator project and then refined with custom templates by Govcraft. This crate will be regenerated and updated as Mistral updates it's OpenAPI specification. Additional customizations are planned.
- API version: 0.0.2
- Crate version: 1.1.4
- Build date: 2024-06-15T23:41:00.377209-06:00America/Mexico_City
- Generator version: 7.6.0
- Build package:
org.openapitools.codegen.languages.RustClientCodegen
Either run:
cargo add mistral-rouille
or add to Cargo.toml
mistral-rouille = "1.1.4"
Examples
View the tests folder for a basic example executing a chat request on Mistral's newest model Codestral.
Documentation for API Endpoints
All URIs are relative to https://api.mistral.ai/v1 or https://codestral.mistral.ai/v1 if you're using Codestral
Class | Method | HTTP request | Description |
---|---|---|---|
DefaultApi | create_chat_completion | POST /chat/completions | Create Chat Completions |
DefaultApi | create_embedding | POST /embeddings | Create Embeddings |
DefaultApi | create_fim_completion | POST /fim/completions | Create FIM Completions |
DefaultApi | files_api_routes_delete_file | DELETE /files/{file_id} | Delete File |
DefaultApi | files_api_routes_list_files | GET /files | List Files |
DefaultApi | files_api_routes_retrieve_file | GET /files/{file_id} | Retrieve File |
DefaultApi | files_api_routes_upload_file | POST /files | Upload File |
DefaultApi | jobs_api_routes_fine_tuning_cancel_fine_tuning_job | POST /fine_tuning/jobs/{job_id}/cancel | Cancel Fine Tuning Job |
DefaultApi | jobs_api_routes_fine_tuning_create_fine_tuning_job | POST /fine_tuning/jobs | Create Fine Tuning Job |
DefaultApi | jobs_api_routes_fine_tuning_get_fine_tuning_job | GET /fine_tuning/jobs/{job_id} | Get Fine Tuning Job |
DefaultApi | jobs_api_routes_fine_tuning_get_fine_tuning_jobs | GET /fine_tuning/jobs | List Fine Tuning Jobs |
DefaultApi | list_models | GET /models | List Available Models |
Documentation For Models
- ChatChoices
- ChatCompletionRequest
- ChatCompletionRequestFunctionCall
- ChatCompletionRequestFunctionCallToolsInner
- ChatCompletionRequestJsonMode
- ChatCompletionResponse
- ChatCompletionResponseFunctionCall
- ChatCompletionResponseJsonMode
- ChatCompletionResponseJsonModeChoicesInner
- ChatFnMessages
- ChatFnTools
- ChatMessage
- ChatMessages
- ChatRequest
- ChatResponse
- ChatResponseFnTool
- ChatUsage
- CheckpointOut
- Choices
- DeleteFileOut
- DeleteFileResponse
- DetailedJobOut
- EmbeddingData
- EmbeddingRequest
- EmbeddingResponse
- EmbeddingUsage
- Error
- ErrorResponse
- EventOut
- FileSchema
- FimChoices
- FimCompletionRequest
- FimCompletionResponse
- FimMessages
- FimStop
- FimUsage
- FineTuneableModel
- FineTuningJobResponse
- JobIn
- JobMetadata
- JobOut
- JobsOut
- JsonModeMessages
- JsonModeResponseFormat
- JsonModeUsage
- ListFilesOut
- ListFilesResponse
- Message
- MetricOut
- Model
- ModelList
- RetrieveFileOut
- RetrieveFileResponse
- ToolsFn
- TrainingParameters
- UploadFileOut
- UploadFileResponse
- Usage
- WandbIntegration
- WandbIntegrationOut
To get access to the crate's generated documentation, use:
cargo doc --open
Author
Dependencies
~11–22MB
~314K SLoC