getting 404 resource not found error
darshilshahquantive opened this issue ยท 8 comments
using azure openai as openai_base_url?
i am trying to do it and getting this error :
response: undefined, failed to send message to openai: Error: OpenAI error 404: {"error":{"code":"404","message": "Resource not found"}}, backtrace: Error: OpenAI error 404: {"error":{"code":"404","message": "Resource not found"}}
at Promise.then.promptTokens (/actions-runner/_work/_actions/fluxninja/openai-pr-reviewer/latest/dist/index.js:3310:29)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
and this is how my workflow yaml looks like :
name: Code Review
permissions:
contents: read
pull-requests: write
on:
pull_request:
pull_request_review_comment:
types: [ created ]
concurrency:
group:
${{ github.repository }}-${{ github.event.number || github.head_ref ||
github.sha }}-${{ github.workflow }}-${{ github.event_name ==
'pull_request_review_comment' && 'pr_comment' || 'pr' }}
cancel-in-progress: ${{ github.event_name != 'pull_request_review_comment' }}
jobs:
review:
runs-on: self-hosted
environment: new-env
steps:
- uses: fluxninja/openai-pr-reviewer@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
with:
debug: false
openai_base_url: https://"your endpoint deployment name".openai.azure.com/
openai_light_model: gpt-35-turbo
openai_heavy_model: gpt-35-turbo
Model name looks incorrect. Try gpt-3.5-turbo
Tried same error , i tried this name as in azure openai services the model name deployed under this name
@harjotgill i got the issue now , basically we are using the chatgpt node package but to use azure/openai as a openai base URL we will need to add support for azure/openai node package as they both have different api's altogether
Azure OpenAi support can be added with this I guess : transitive-bullshit/agentic#352 (comment)
If you folks fix it, please contribute back! Cheers!
Yes it works , i will push it with generalising the feature with paramas
https://github.com/darshilshahquantive/ai-pr-reviewer
@darshilshahquantive Did you change anything typescript wise, or just index.js to get it working? This thing has been a huge pain in my butt these last couple weeks, so any help would be appreciated.
index.ts fix will work but if you want to use azure 3.5 turbo with 16 k context you have to edit limit.ts else it will use this much tokrn limit by default https://github.com/darshilshahquantive/ai-pr-reviewer/blob/10783d111ba827426dc67c38e809283ad18877ca/src/limits.ts#L21