Skip to content

Commit

Permalink
Further simplify ChatModel:
Browse files Browse the repository at this point in the history
- Remove provider-specific model files (LiteLLM handles it)
- Remove token count tracking (not needed)
- Update tests to match simpler response format
  • Loading branch information
openhands-agent committed Dec 26, 2024
1 parent ef7f29b commit 9171818
Show file tree
Hide file tree
Showing 12 changed files with 2 additions and 1,184 deletions.
6 changes: 0 additions & 6 deletions src/wandbot/chat/chat_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,19 +123,13 @@ def generate_response(

return {
"content": response.choices[0].message.content,
"total_tokens": response.usage.total_tokens,
"prompt_tokens": response.usage.prompt_tokens,
"completion_tokens": response.usage.completion_tokens,
"error": None,
"model_used": response.model
}

except Exception as e:
return {
"content": "",
"total_tokens": 0,
"prompt_tokens": 0,
"completion_tokens": 0,
"error": {
"type": type(e).__name__,
"message": str(e)
Expand Down
6 changes: 0 additions & 6 deletions src/wandbot/chat/models/__init__.py

This file was deleted.

104 changes: 0 additions & 104 deletions src/wandbot/chat/models/anthropic_model.py

This file was deleted.

97 changes: 0 additions & 97 deletions src/wandbot/chat/models/base.py

This file was deleted.

126 changes: 0 additions & 126 deletions src/wandbot/chat/models/gemini_model.py

This file was deleted.

Loading

0 comments on commit 9171818

Please sign in to comment.