Skip to content

Commit 796c3e7

Browse files
authored
Merge pull request #1022 from lucagobbi/develop
fix cat.llm for wide-range compatibility
2 parents 5148518 + 6f82bfd commit 796c3e7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/cat/looking_glass/stray_cat.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from typing import Literal, get_args, List, Dict, Union, Any
77

88
from langchain.docstore.document import Document
9-
from langchain_core.messages import SystemMessage, BaseMessage
9+
from langchain_core.messages import BaseMessage, HumanMessage
1010
from langchain_core.runnables import RunnableConfig, RunnableLambda
1111
from langchain_core.prompts import ChatPromptTemplate
1212
from langchain_core.output_parsers.string import StrOutputParser
@@ -322,8 +322,8 @@ def llm(self, prompt: str, stream: bool = False) -> str:
322322
# here we deal with motherfucking langchain
323323
prompt = ChatPromptTemplate(
324324
messages=[
325-
SystemMessage(content=prompt)
326-
# TODO: add here optional convo history passed to the method,
325+
HumanMessage(content=prompt) # We decided to use HumanMessage for wide-range compatibility even if it could bring some problem with tokenizers
326+
# TODO: add here optional convo history passed to the method,
327327
# or taken from working memory
328328
]
329329
)

0 commit comments

Comments
 (0)