From 4977164ef40d6cd48c68fcdac05717bbd86240ff Mon Sep 17 00:00:00 2001 From: Clayton Smith Date: Fri, 9 Aug 2024 18:12:03 -0400 Subject: [PATCH] Added forced preamble, minimap is active by default, and search now uses v1 endpoints --- src/backend/chat/custom/langchain.py | 2 +- src/backend/config/tools.py | 1 + .../src/components/Conversation/MessagingContainer.tsx | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/backend/chat/custom/langchain.py b/src/backend/chat/custom/langchain.py index a902fd2ae7..0f699285b6 100644 --- a/src/backend/chat/custom/langchain.py +++ b/src/backend/chat/custom/langchain.py @@ -59,7 +59,7 @@ def chat(self, chat_request: LangchainChatRequest, **kwargs: Any) -> Any: verbose=True, ) - raise NotImplementedError("Langchain is not yet implemented") + return self.agent_executor.stream( { diff --git a/src/backend/config/tools.py b/src/backend/config/tools.py index 6ba561be59..9e579565e0 100644 --- a/src/backend/config/tools.py +++ b/src/backend/config/tools.py @@ -187,3 +187,4 @@ def get_available_tools() -> dict[ToolName, dict]: AVAILABLE_TOOLS = get_available_tools() + diff --git a/src/interfaces/coral_web/src/components/Conversation/MessagingContainer.tsx b/src/interfaces/coral_web/src/components/Conversation/MessagingContainer.tsx index 10e90d849d..c03ab45e12 100644 --- a/src/interfaces/coral_web/src/components/Conversation/MessagingContainer.tsx +++ b/src/interfaces/coral_web/src/components/Conversation/MessagingContainer.tsx @@ -112,7 +112,7 @@ const Content: React.FC = (props) => { const payload = { ids: Array.from(minimapCitationsUnique), citationId: generationId, - search_key: parseInt((minimapCitations[0] as { fields: { search_key: string } }).fields.search_key), + search_key: parseInt((minimapCitations[0] as any ).fields.search_key), } // Send to parent window