ai-codereviewer
ai-codereviewer copied to clipboard
facing 404 error in https://api.openai.com/v1/chat/completions api , open api key is added in git hub secret , do i need to pay in open api
response: {
status: 404,
statusText: 'Not Found',
headers: {
date: 'Tue, 21 Nov 2023 11:45:46 GMT',
'content-type': 'application/json; charset=utf-8',
'content-length': '291',
connection: 'close',
vary: 'Origin',
'x-request-id': '141863fc39006e4ba1b203cf094e8c86',
'strict-transport-security': 'max-age=15724800; includeSubDomains',
'cf-cache-status': 'DYNAMIC',
'set-cookie': [Array],
server: 'cloudflare',
'cf-ray': '8298b03bfea90fe8-LAX',
'alt-svc': 'h3=":443"; ma=86400'
},
config: {
transitional: [Object],
adapter: [Function: httpAdapter],
transformRequest: [Array],
transformResponse: [Array],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
validateStatus: [Function: validateStatus],
headers: [Object],
method: 'post',
data: '{"model":"gpt-4","temperature":0.2,"max_tokens":700,"top_p":1,"frequency_penalty":0,"presence_penalty":0,"messages":[{"role":"system","content":"Your task is to review pull requests. Instructions:\n- Provide the response in following JSON format: [{\"lineNumber\": <line_number>, \"reviewComment\": \"diff\\n@@ -0,0 +1,22 @@\\n1 +name: AI Code Reviewer\\n2 +\\n3 +on:\\n4 + pull_request:\\n5 + types:\\n6 + - opened\\n7 + - synchronize\\n8 +permissions: write-all\\n9 +jobs:\\n10 + review:\\n11 + runs-on: ubuntu-latest\\n12 + steps:\\n13 + - name: Checkout Repo\\n14 + uses: actions/checkout@v3\\n15 +\\n16 + - name: AI Code Reviewer\\n17 + uses: santosh-invt/ai-code-reviewer@main\\n18 + with:\\n19 + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\\n20 + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}\\n21 + OPENAI_API_MODEL: \\"gpt-3.5-turbo\\" # Optional: defaults to \\"gpt-4\\"\\n22 + exclude: \\"**/*.json, **/*.md\\" # Optional: exclude patterns separated by commas\\n22 \\\\ No newline at end of file\\n
\n"}]}',
url: 'https://api.openai.com/v1/chat/completions'
}