Open krishnakalyan3 opened 5 months ago
cc: @okotek
As a workaround, I added the following to my .pr_agent.toml and it worked:
[openai]
api_type = "azure"
api_version = '2024-02-01'
api_base = ...
deployment_id = "gpt-4"
@gregmeldrum Do you mind providing more details about your config? I can't get mine working with Azure AI. Did you change the action before it started working?
@blakeashleyjr I realize that one of the key things I did (happy accident) was to name my azure model deployments the same as what you would expect for openai model names (for instance "gpt-4" and "gpt-4o"). I set the OPENAI_KEY to be my Azure OpenAI key. The main part of the work-around however was what I mentioned above about adding an [openai]
section in my .pr_agent.toml in the root directory of the repo with the appropriate azure settings.
[openai]
api_type = "azure"
api_version = '2024-02-01'
api_base = ....
deployment_id = "gpt-4"
[config]
model="gpt-4o"
model_turbo="gpt-4"
@krishnakalyan3 this works for me:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
github_action_config.auto_review: "true"
github_action_config.auto_describe: "true"
github_action_config.auto_improve: "true"
OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
OPENAI.API_TYPE: 'azure'
OPENAI.API_BASE: 'https://YOUR_RESOURCE.openai.azure.com'
OPENAI.DEPLOYMENT_ID: 'YOUR_DEPLOYMENT'
OPENAI.API_VERSION: '2024-02-01'
I am unable to get the PR agent to work. Can you please let me know if I have configured the action correctly.
Related: https://github.com/Codium-ai/pr-agent/issues/245