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

generators: move read timeout up to global/base.Generator config item #715

Open
leondz opened this issue May 31, 2024 · 2 comments
Open
Labels
generators Interfaces with LLMs

Comments

@leondz
Copy link
Collaborator

leondz commented May 31, 2024

Currently the read timeout is hard-coded a bunch of places, and not configurable. Instead, generator read timeout should be configurable.

@leondz leondz added the generators Interfaces with LLMs label May 31, 2024
@leondz leondz changed the title generators: move read timeout up to global/base.Generator config item generators: move read timeout up to global/base.Generator config item Jun 3, 2024
@ls-omar-nbou
Copy link

Hi @leondz, glad I found this issue since I was about to create one (seems also to be related to this one -> #448 ). I have started to use this great framework for the past few days and this is an annoying issue especially for REST generators. It would be great to be able to configure that via a parameter.

Keep up the great work.

@ls-omar-nbou
Copy link

I was able to fix the issue using the parameter request_timeout documented in here https://reference.garak.ai/en/latest/garak.generators.rest.html via a JSON definition into a file and pass the filename to --generator_option_file.
{ "rest": { "RestGenerator": { "name": "Chatbot test", "uri": "<URL_PATH>", "method": "post", "headers": { "Authorization": "Bearer <TOKEN>", "Content-Type": "application/json" }, "req_template_json_object": { "api_provider":"groq", "chat_history":[{"role":"user","content":"$INPUT"}] }, "response_json": true, "response_json_field": "message", **"request_timeout": 180** } } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
generators Interfaces with LLMs
Projects
None yet
Development

No branches or pull requests

2 participants