/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */

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: [
      {
        content:
          "Who is the best French painter? Answer in one short sentence.",
        role: "user",
      },
    ],
    responseFormat: {
      type: "text",
    },
  });

  console.log(result);
}

main().catch(console.error);
