mshumer / gpt-author

MIT License
2.45k stars 354 forks source link

use of Azure ChatGPT's API #27

Open bohailaoyao opened 9 months ago

bohailaoyao commented 9 months ago

How can I do that? Can someone help me?

fuleinist commented 9 months ago

https://learn.microsoft.com/en-us/azure/ai-services/openai/chatgpt-quickstart?tabs=command-line&pivots=programming-language-python

based on which you should be able to connect to Azure by setting up the params below together with your api key

openai.api_type = "azure" openai.api_base = os.getenv("AZURE_OPENAI_ENDPOINT") openai.api_key = "YOUR OPENAI KEY"