/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 02da06cfbc3a */ import dotenv from "dotenv"; dotenv.config(); /** * Example usage of the @mistralai/mistralai-azure SDK * * To run this example from the examples directory: * npm run build && npx tsx chatComplete.example.ts */ import { MistralAzure } from "@mistralai/mistralai-azure"; const mistralAzure = new MistralAzure({ apiKey: process.env["MISTRAL_API_KEY"] ?? "", }); async function main() { const result = await mistralAzure.chat.complete({ messages: [ { role: "user", content: "Who is the best French painter? Answer in one short sentence.", }, ], responseFormat: { type: "text", }, }); console.log(result); } main().catch(console.error);