Skip to content

vincmag360/CSHARP-WinForm-MISTRAL-AI-TEST-LLM

Repository files navigation

C# C# C# License: MIT

Current Release

This is a simple Windows application in WinForm to test the Mistral AI LLM.

Mistral.SDK Usage

This application utilizes the Mistral.SDK, an unofficial C# client designed for interacting with the Mistral API. /~https://github.com/tghamm/Mistral.SDK

Application Features

  • This application facilitates interaction with the various AI models offered by Mistral AI. It also features a straightforward management system for Prompts.
  • This software includes a "ChatBot" feature that allows for contextual conversations. It is also possible to reset the chat history. Closing the application does not erase this history.

Response Format

  • The response format used in this application is "text," but it is possible to use JSON in the code. See the Mistral API: Enum: "text" "json_object". JSON allows you to have a formatted response and exploit it to create a rich graphical response or have interesting actions.
  • The output is in HTML format (conversion of markdown txt to HTML).
  • Code examples are displayed in a blue frame in the HTML response.

API Documentation

Mistral AI API documentation: https://docs.mistral.ai/api/#tag/chat

Experimentation with Mistral AI

Experimentation with Mistral AI is free and does not require providing a payment method. In return, Mistral AI reserves the right to exploit the input and output data, as well as the prompts.

Limits

API Key

  • To get started, create a Mistral account https://mistral.ai/ or sign in at console.mistral.ai.
  • After that, go to the API keys page and make a new API key by clicking Create new key.
  • Make sure to copy the API key, save it safely, ⚠️ and do not share it with anyone.
  • Put the API key in the file fichier.xml between <Key></Key>

fichier.xml

In this file, it is possible to :

  • 📌Set the API Keys from your Mistral account <Key>BLABLABLA</Key>
  • 📌Set the rendering of the response in CSS
<KeyCCS>
h1 {color: #800080;}
h2 {color: #9f3981;}
h3 {color: #000000d9;}
h4 {color: #a3a2a0;}
h5 {color: #b9b7b7;}
h6 {color: #d2d7e2;}
</KeyCCS>
  • 📌Set the background color of the rendering <KeyBACK>white</KeyBACK>
  • 📌Set the default rendering model of the Mistral LLM <KeyModelDefault>pixtral-large-latest</KeyModelDefault>

⭐Is This the End of Web Browsers ?

  • No use of a web browser.
  • Your Internet service provider does not see your activity.
  • Google is not spying on you!
  • Quick opening.
  • Portability, no need for setup.
  • Management of prompts.

alt text

Back to top