fix: align venice/chat.py with gitea/dev.py patterns #2
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/venice-chat-integration"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fixed venice/chat.py to align with the patterns established in gitea/dev.py for consistent tool integration with Open WebUI.
Changes
Bug Fixes
_get_api_key()now accepts__user__parameter - Fixes per-user API key configuration not being read from UserValves__init__- Now properly handles__user__dict with nested valves structure__user__parameter to helper methods -_get_traits()and_get_available_models()now pass user context for API key resolutionImprovements
_format_error()helper - Consistent error message formatting matching gitea/dev.py patternsself.citation = True- Enables tool usage visibility for debugging**Header**) consistently instead of verbose "Status: 200" lines__init__- Acceptsvalvesparameter for framework-driven configuration injectionVersion Bump
Okay, testing discovery
the "method" _get_api_key is "duplicated", so this is an apparent runtime issue with Open WebUI
1 solution would be to make a Class at the top for the "helper functions" named after the tool we are working on, this would have the effect of a namespace
Feel free to brainstorm other ideas
I made necessary changes to get the code to save as there were pydantic issues
Pull request closed