WPeace-HcH / WPeChatGPT

A plugin for IDA that can help to analyze binary file, it can be based on models such as gpt-3.5 turbo, gpt-4 trained by OpenAI, the same as ChatGPT.
964 stars 164 forks source link

是否支持 azure GPT? #25

Open xbigwork opened 2 weeks ago

xbigwork commented 2 weeks ago

是否支持 azure GPT?怎么配置?

WPeace-HcH commented 2 weeks ago

你好,可以尝试使用反代URL,在插件代码修改 proxy_address 和 openai_api_key 参数: openai_api_key = xxx proxy_address=https://gpt-4-vision-resource.openai.azure.com/openai/deployments/gpt-4-vision/extensions

xbigwork commented 2 weeks ago

感谢回复,使用代码,可以实现:

from openai import AzureOpenAI

client = AzureOpenAI( azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT"), api_key=os.getenv("AZURE_OPENAI_API_KEY"), api_version="2024-02-01" )