Skip to content

Commit

Permalink
Merge pull request #1022 from lucagobbi/develop
Browse files Browse the repository at this point in the history
fix cat.llm for wide-range compatibility
  • Loading branch information
pieroit authored Jan 27, 2025
2 parents 5148518 + 6f82bfd commit 796c3e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/cat/looking_glass/stray_cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from typing import Literal, get_args, List, Dict, Union, Any

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

0 comments on commit 796c3e7

Please sign in to comment.