This commit is contained in:
Eugene Yurtsev
2023-09-01 14:13:02 -04:00
parent 2c798fcc77
commit 7181211d78
2 changed files with 4 additions and 7 deletions

View File

@@ -59,7 +59,6 @@ def create_llm_program(
"""Create a runnable that can update memory."""
tool_invoker = create_tool_invoker(tools) if invoke_tools else None
# openai_funcs = [format_tool_to_openai_function(tool_) for tool_ in tools]
def _bound(message_log: MessageLog):
messages = []
@@ -67,8 +66,6 @@ def create_llm_program(
llm_chain = llm
if stop:
llm_chain = llm_chain.bind(stop=stop)
# if tools: # Should this be done here?
# llm_chain = llm_chain.bind(functions=openai_funcs)
result = llm_chain.invoke(prompt_value)

View File

@@ -26,16 +26,16 @@ class FunctionResult(InternalMessage):
error: Optional[str] = None
class AgentFinish(InternalMessage):
result: Any
class PrimingMessage(InternalMessage):
"""A message that is used to prime the language model."""
content: str
class AgentFinish(InternalMessage):
result: Any
MessageLike = Union[
BaseMessage, FunctionCall, FunctionResult, AgentFinish, PrimingMessage
]