MCPcopy
hub / github.com/AsyncFuncAI/deepwiki-open / CustomConversation

Class CustomConversation

api/rag.py:28–38  ·  view source on GitHub ↗

Custom implementation of Conversation to fix the list assignment index out of range error

Source from the content-addressed store, hash-verified

26 assistant_response: AssistantResponse
27
28class CustomConversation:
29 """Custom implementation of Conversation to fix the list assignment index out of range error"""
30
31 def __init__(self):
32 self.dialog_turns = []
33
34 def append_dialog_turn(self, dialog_turn):
35 """Safely append a dialog turn to the conversation"""
36 if not hasattr(self, 'dialog_turns'):
37 self.dialog_turns = []
38 self.dialog_turns.append(dialog_turn)
39
40# Import other adalflow components
41from adalflow.components.retriever.faiss_retriever import FAISSRetriever

Callers 3

__init__Method · 0.85
callMethod · 0.85
add_dialog_turnMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected