Skip to content

Commit

Permalink
Fix the ci error about the langchain (#341)
Browse files Browse the repository at this point in the history
Signed-off-by: SimFG <bang.fu@zilliz.com>
  • Loading branch information
SimFG committed May 15, 2023
1 parent ca7f2f8 commit 261b416
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gptcache/adapter/langchain_models.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from typing import Optional, List, Any

from gptcache.adapter.adapter import adapt
from gptcache.manager.scalar_data.base import Answer, DataType
from gptcache.session import Session
from gptcache.utils import import_pydantic, import_langchain
from gptcache.manager.scalar_data.base import Answer, DataType

import_pydantic()
import_langchain()
Expand Down Expand Up @@ -82,6 +82,10 @@ class LangChainChat(BaseChatModel, BaseModel):
chat([HumanMessage(content="Translate this sentence from English to French. I love programming.")])
"""

@property
def _llm_type(self) -> str:
return "gptcache_llm_chat"

chat: Any
session: Session = None

Expand Down

0 comments on commit 261b416

Please sign in to comment.