MistralGPTIntegration
MistralGPTIntegration is a Python package designed to provide GPT-based functionalities using the Mistral AI API. It enables users to quickly obtain comprehensive, context-aware responses from the model.
Installation
To install MistralGPTIntegration, you can use pip:
pip install MistralGPTIntegration
Usage
After installation, MistralGPTIntegration can be used in your Python scripts.
Example:
from mistralgptintegration import MistralGPTIntegration
api_key = "<your_api_key>"
mistral = MistralGPTIntegration(api_key)
prompt = "Once upon a time"
response = mistral.query_gpt(prompt)
print(response)
api_key: Your Mistral API key.model_name: The name of the Mistral model to use. Defaults tomistral-tiny.temperature: The temperature to use for the model. Defaults to0.1.top_p: The top_p to use for the model. Defaults to1.0.max_tokens: The maximum number of tokens to generate. Defaults to150.
Customizing Your Queries
You can customize the behavior of MistralGPTIntegration by adjusting the parameters, such as the temperature, top_p, max_tokens, etc., to fit the specific needs of your queries or to tweak the behavior of the Mistral model.
Output Example
When you query the model, it processes your prompt and returns a response. Here is an example of the output:
{
"id": "63213d34c61f4d96b893d7b1afc2b893",
"object": "chat.completion",
"created": 1706372087,
"model": "mistral-small",
"choices": [
{
"message": {
"role": "assistant",
"content": "some text"
},
"finish_reason": "stop",
"index": 0
}
],
"usage": {
"prompt_tokens": 318,
"total_tokens": 622,
"completion_tokens": 304
}
}
Contributing
Contributions, issues, and feature requests are welcome! Feel free to check issues page.
License
Release files for MistralGPTIntegration 2025.5.180912
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mistralgptintegration-2025.5.180912.tar.gz | 4.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mistralgptintegration-2025.5.180912-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.6 kB
Release files / mistralgptintegration-2025.5.180912.tar.gz
| Download URL | mistralgptintegration-2025.5.180912.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
69ddbc53d253b37e73d08a64741208b63bfafa01fbca2fff08e6f6c08a4dd927
|
|
BLAKE2b-256 checksum How to use checksums |
65a731e644900106feb65de5216f99222a44f58bb794467d54f136ac2385bd30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.11
|
Release files / mistralgptintegration-2025.5.180912-py3-none-any.whl
| Download URL | mistralgptintegration-2025.5.180912-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d24329975e1913aa75a0aff31b70c1880cee7687f6f2eb5bc9ddca6c58d932d1
|
|
BLAKE2b-256 checksum How to use checksums |
b324effcd51fef59d5bd59e534f327ce40993d1d226ce30cfdea75655f77fc9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.11
|