Skip to content

Commit

Permalink
more logging and add o3
Browse files Browse the repository at this point in the history
  • Loading branch information
shivanker committed Feb 1, 2025
1 parent c3facd3 commit b118624
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lite_llms.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class TextModel(Enum):
GPT_4O_MINI = "gpt-4o-mini"
GPT_4_TURBO = "gpt-4-turbo"
O1 = "o1"
O1_MINI = "o1-mini"
O3_MINI = "o3-mini"
CLAUDE_3_OPUS = "claude-3-opus-20240229"
CLAUDE_35_SONNET = "claude-3-5-sonnet-20241022"
CLAUDE_35_HAIKU = "claude-3-5-haiku-20241022"
Expand Down
14 changes: 7 additions & 7 deletions session.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ def extract(text):
if match:
url = match.group(1)
if is_youtube_video(url):
logger.debug(f"Fetching youtube transcript for [{url}].")
return yt_transcript(url) or f"Failed to extract transcript for {url}."
logger.debug(f"Reading text from [{url}].")
return scrape_text(url) or f"Failed to scrape text from {url}."
logger.info(f"Fetching youtube transcript for {url}. Original text {text}")
return yt_transcript(url) or f"Failed to extract transcript for {url}. Original text {text}"
logger.info(f"Reading text from [{url}]. Original text {text}")
return scrape_text(url) or f"Failed to scrape text from {url}. Original text {text}"


class ChatSession:
Expand Down Expand Up @@ -237,8 +237,8 @@ def process_command(self, text, say=lambda text: None):
elif cmd == "\\o1":
self.model = TextModel.O1
say(text="Model set to O1.")
elif cmd in ["\\o1-mini", "\\o1mini", "\\mini"]:
self.model = TextModel.O1_MINI
elif cmd in ["\\o3-mini", "\\o3mini", "\\mini"]:
self.model = TextModel.O3_MINI
say(text="Model set to O1 Mini.")
elif cmd in ["\\gpt4o", "\\gpt"]:
self.model = TextModel.GPT_4O
Expand Down Expand Up @@ -300,7 +300,7 @@ def process_command(self, text, say=lambda text: None):
- \\reset: Reset the chat session. Preserves the previous LLM you were chatting with.\n
- \\who: Returns the name of the chat model you are chatting with.\n
- \\o1: Use O1 for future messages.\n
- \\o1mini: Use O1 Mini for future messages.\n
- \\o3mini: Use O1 Mini for future messages.\n
- \\gpt4o: Use GPT-4o (Omni) for future messages.\n
- \\sonnet: Use Claude 3.5 Sonnet for future messages.\n
- \\llama: Use LLaMA-3.1 405B for future messages.\n
Expand Down

0 comments on commit b118624

Please sign in to comment.