Skip to content

Issu with OpenAI key #62

Closed Answered by divya-akula
divya-akula asked this question in Q&A
Jun 10, 2023 · 4 comments · 3 replies
Discussion options

You must be logged in to vote

hi @waldekmastykarz ,

Sure, I would love to share,I was using Azure OpenAI key with OpenAI , and the above code would remain the same, except that the planner am using now is Azure Planner

const planner = new AzureOpenAIPlanner({
  apiKey: config.openAIKey,
  defaultModel: 'MyGPT3', // Model created in GPT
  logRequests: true,
  endpoint:config.openAPIEndPoint,
});

and updated the references and installed the modules accordingly

import { AzureOpenAIClient, AzureOpenAIClientOptions } from "@microsoft/teams-ai/lib/OpenAIClients";
import { AzureKeyCredential, OpenAIClient } from "@azure/openai";
import { Application, ConversationHisory, DefaultPromptManager, DefaultTurnState, OpenAIModerator,A…

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@waldekmastykarz
Comment options

@divya-akula
Comment options

Answer selected by waldekmastykarz
@divya-akula
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #53 on June 12, 2023 08:26.