JusticeRage / Gepetto

IDA plugin which queries uses language models to speed up reverse-engineering
GNU General Public License v3.0
2.73k stars 261 forks source link

Groq renaming variables Error code: 400 using #37

Closed AbanoubNassem closed 2 weeks ago

AbanoubNassem commented 2 weeks ago

the explain function works fine , however the renaming variables function throw error:

Request to llama3-70b-8192 sent...
General exception encountered while running the query: Error code: 400 - {'error': {'message': "Failed to generate JSON. Please adjust your prompt. See 'failed_generation' for more details.", 'type': 'invalid_request_error', 'code': 'json_validate_failed', 'failed_generation': '{"v1": "packetTypeClassificationResult"},\n  {"v2": "packetByte"},\n  {"v3": "subFunctionReturn"},\n  {"v4": "dword_A58260_Modified"},\n  {"v5": "word_A55020_Index"},\n  {"v6": "word_A55022_Counter"},\n  {"v7": "packetDataPointer"},\n  {"v8": "word_A55022_Counter_Copy"},\n  {"v9": "word_A55000_Pointer"},\n  {"v10": "word_A55000_Pointer_Copy"},\n  {"v11": "word_A55000_Array_Element"},\n  {"v12": "dword_A58260_Modified_Copy"},\n  {"v13": "dword_A58260_Modified_2"},\n  {"v14": "dword_A55CE8_Modified"},\n  {"v15": "dword_A58260_Modified_3"},\n  {"v16": "dword_A58260_Modified_4"},\n  {"v17": "dword_A58260_Modified_5"},\n  {"v18": "dword_A58260_Modified_6"},\n  {"v19": "packetByteCount"},\n  {"v20": "dword_A55C94_Offset"},\n  {"v21": "packetDataIndex"},\n  {"v22": "dword_A55CA8_Pointer"},\n  {"v23": "dword_A55C94_Element"},\n  {"v24": "dword_A58260_Modified_7"},\n  {"v25": "dword_A58260_Modified_8"}'}}
JusticeRage commented 2 weeks ago

Thanks for reporting this! Is this something that happens all the time or randomly?

AbanoubNassem commented 2 weeks ago

@JusticeRage it fails 95% of the time, and sometimes it works fine, however with gpt it alway works, but they terminated my open-ai account for using the plug-in.

JusticeRage commented 2 weeks ago

As far as I can tell, Groq sometimes fails to generate valid JSON: https://console.groq.com/docs/text-chat There's not much I can do on my end, hopefully models will get more reliable in the future...

AbanoubNassem commented 2 weeks ago

I see, will close this issue for now, thanks.