File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
llm-service/app/services/chat_history Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ class RagStudioChatMessage(BaseModel):
6464
6565
6666class ChatHistoryManager (metaclass = ABCMeta ):
67- def __init__ (self ):
67+ def __init__ (self ) -> None :
6868 pass
6969
7070 @abstractmethod
Original file line number Diff line number Diff line change 3838import functools
3939import json
4040import logging
41- from typing import List
41+ from typing import List , cast
4242
4343import boto3
4444from boto3 import Session
5757class S3ChatHistoryManager (ChatHistoryManager ):
5858 """Chat history manager that uses S3 for storage."""
5959
60- def __init__ (self ):
60+ def __init__ (self ) -> None :
6161 super ().__init__ ()
6262 self .bucket_name = settings .document_bucket
6363 self .bucket_prefix = settings .document_bucket_prefix
@@ -66,7 +66,7 @@ def __init__(self):
6666 def s3_client (self ) -> S3Client :
6767 """Lazy initialization of S3 client."""
6868 session : Session = boto3 .session .Session ()
69- return session .client ("s3" )
69+ return cast ( S3Client , session .client ("s3" ) )
7070
7171 def _get_s3_key (self , session_id : int ) -> str :
7272 """Build the S3 key for a session's chat history."""
You can’t perform that action at this time.
0 commit comments