File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121import textwrap
2222from typing import Union
2323
24- # pinecone integration
25- from langchain .cache import InMemoryCache
26-
2724# embedding
2825from langchain .globals import set_llm_cache
2926from langchain .prompts import PromptTemplate
3027from langchain .schema import BaseMessage , HumanMessage , SystemMessage
3128
29+ # pinecone integration
30+ from langchain_community .cache import InMemoryCache
31+
3232# hybrid search capability
3333from langchain_community .retrievers .pinecone_hybrid_search import (
3434 PineconeHybridSearchRetriever ,
@@ -110,7 +110,8 @@ def cached_chat_request(
110110 human_message = HumanMessage (content = str (human_message ))
111111 messages = [system_message , human_message ]
112112 # pylint: disable=not-callable
113- retval = self .chat (messages )
113+ # retval = self.chat(messages)
114+ retval = self .chat .invoke (messages )
114115 return retval
115116
116117 def prompt_with_template (
Original file line number Diff line number Diff line change 1919# pinecone integration
2020# import pinecone
2121from pinecone import Pinecone , ServerlessSpec
22- from pinecone .core .client .exceptions import PineconeApiException
22+ from pinecone .core .openapi . shared .exceptions import PineconeApiException
2323from pinecone .models import IndexList
2424
2525# this project
You can’t perform that action at this time.
0 commit comments