Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenAI Integration currently not available #1360

Open
busby666 opened this issue Oct 31, 2024 · 8 comments
Open

OpenAI Integration currently not available #1360

busby666 opened this issue Oct 31, 2024 · 8 comments
Labels
AI-assissted firmware analysis bug Something isn't working EMBA EMBArk help wanted Extra attention is needed issue in 3rd party component something in a 3rd party component we are using

Comments

@busby666
Copy link

Modified the config/gpt_config.env.template with the directions on page: https://github.com/e-m-b-a/emba/wiki/AI-supported-firmware-analysis

Then I copied the gpt_config.env.templage to gpt_config.env.

I attempted to test doing the command: ./emba -U

Then I get a TON of errors.
[-] ChatGPT error while testing the API-Key: KEYREDACTED
OpenAI-API key - not ok
[-] ChatGPT error while testing the API-Key: KEYREDACTED
OpenAI-API key - not ok
[-] ChatGPT error while testing the API-Key: KEYREDACTED
OpenAI-API key - not ok
[-] ChatGPT error while testing the API-Key: KEYREDACTED
OpenAI-API key - not ok
[-] ChatGPT error while testing the API-Key: KEYREDACTED
OpenAI-API key - not ok
[-] ChatGPT error while testing the API-Key: KEYREDACTED
OpenAI-API key - not ok
[-] ChatGPT error while testing the API-Key: KEYREDACTED
OpenAI-API key - not ok

Here is the .ENV File
OPENAI_API_KEY="KEYREDACTED"
GPT_QUESTION="For the following code I need you to tell me how an attacker could exploit it and point out all vulnerabilities."
MAXMIUM_GPT_PRIO=3

Do I have some error? Do you have a better way for me to test and I will double check the API KEY.

@busby666
Copy link
Author

Additionally; if you do the ./emba -U when it gets to verify the ChatGPT KEY it seems to be in an infinite loop.

@busby666
Copy link
Author

Did a TEST connection with Curl and get an error that the ONE call to test was too much. I notice the model is GPT-40-mini. Is there another I should test with?

@BenediktMKuehne
Copy link
Member

Model can be set under config/gpt_template.json , that's the template used for openai-api calls.
Here are the model options: https://platform.openai.com/docs/models

I'm asuming you tested with something like this:
curl -sS https://api.openai.com/v1/chat/completions -H "Content-Type: application/json" \ -H "Authorization: Bearer ${OPENAI_API_KEY}" \ -d @"${CONFIG_DIR}/gpt_template.json" --write-out "%{http_code}" -o /tmp/chatgpt-test.json

What exactly was the error? Ratelimit?
I haven't used this feature in a while, maybe they changed something

@busby666
Copy link
Author

The MODEL in the JSON file is gpt-3.5-turbo. looks like according to the link you gave me the model might need to be: gpt-3.5-turbo-0125 but according to the documentation should work fine.

I typed the CURL command and get the same error:

{
"error": {
"message": "You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors.",
"type": "insufficient_quota",
"param": null,
"code": "insufficient_quota"
}
}
429

Tried a few other models and always get the same thing.

any suggestions; should we try grok; looks like the syntax would be similar?

@BenediktMKuehne
Copy link
Member

I have never used it.
Does it have advantages over open-ai?

@busby666
Copy link
Author

busby666 commented Nov 4, 2024

No I was just trying to get the "AI" Module and did not know if anyone had tried GROK with it or if the same issues about having to pay for everything exists. That is what I get from the API TESTS with openai now.

Copy link

github-actions bot commented Dec 3, 2024

This issue is stale because it has been open for 28 days with no activity.

@github-actions github-actions bot added the stale label Dec 3, 2024
@m-1-k-3 m-1-k-3 changed the title Error with Chat GPT Key OpenAI Integration currently not available Dec 4, 2024
@m-1-k-3
Copy link
Member

m-1-k-3 commented Dec 4, 2024

Changed the title as the current ChatGPT integration looks broken and is currently not working. Helpers are welcome!

@m-1-k-3 m-1-k-3 added help wanted Extra attention is needed EMBArk issue in 3rd party component something in a 3rd party component we are using and removed stale labels Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AI-assissted firmware analysis bug Something isn't working EMBA EMBArk help wanted Extra attention is needed issue in 3rd party component something in a 3rd party component we are using
Projects
None yet
Development

No branches or pull requests

3 participants