Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
npm install @google/generative-ai

Azure OpenAI

To work with models through the Azure OpenAI service, follow these steps:

  1. Go to https://portal.azure.com and sign in.

  2. Search and select the Azure OpenAI service.

  3. Click Create a resource and fill out the form to create the resource.

  4. Go to the resource and select Keys and Endpoint and copy those items into your config.js file as endpoint and apiKey properties of your model. Set the provider property to “openai”.

  5. Go to Manage Deployments.

  6. Select Create Deployment.

  7. Select desired model and model version; then give it a name. Supply this name as the model property in your config.js file. Ensure the model and version you select supports function calling. It may take a few minutes before the model is fully deployed.