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

Handle Open Assistant error event_type #422

Merged

Conversation

tanchekwei
Copy link
Contributor

@tanchekwei tanchekwei commented Jul 17, 2023

Handle below error response:

data: {"event_type": "error", "error": "Request failed during generation: Server error: transport error", "message": {"id": "123", "parent_id": "123", "content": null, "chat_id": "123", "created_at": "2023-07-17T03:44:08.659000", "role": "assistant", "state": "aborted_by_worker", "score": 0, "reports": [], "work_parameters": {"model_config": {"model_id": "OpenAssistant/oasst-sft-6-llama-30b", "max_input_length": 1024, "max_total_length": 1792, "quantized": false}, "sampling_parameters": {"top_k": 50, "top_p": 0.95, "typical_p": null, "temperature": 0.75, "repetition_penalty": 1.2, "max_new_tokens": 1024}, "do_sample": true, "seed": 123, "system_prompt": null, "plugins": [], "plugin_max_depth": 4}, "safe_content": null, "safety_level": null, "safety_label": null, "safety_rots": null, "used_plugin": null}}

And add try-catch block

And update done to true after stream closed.

@vercel
Copy link

vercel bot commented Jul 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
chatall ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2023 11:45am

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

Successfully merging this pull request may close these issues.

2 participants