Skip to content

Commit

Permalink
Fix return type of _get_model_by_name
Browse files Browse the repository at this point in the history
  • Loading branch information
Flagro committed Oct 14, 2024
1 parent 55d1c4a commit 19f4075
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bot/rp_bot/ai_agent/ai.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import tiktoken
import io
from typing import AsyncIterator, Literal, Optional
from typing import AsyncIterator, Literal
from openai import OpenAI
from langchain_openai import OpenAI
from langchain_core.messages import HumanMessage, SystemMessage
Expand Down Expand Up @@ -57,7 +57,7 @@ def _get_default_model_name(

def _get_model_by_name(
self, model_name: str, model_type: Literal["text", "vision", "image_generation"]
) -> Optional[Model]:
) -> Model:
models_dict = {
"text": self.ai_config.TextGeneration.Models,
"vision": self.ai_config.TextGeneration.Models,
Expand Down

0 comments on commit 19f4075

Please sign in to comment.