mirror of
https://github.com/hwchase17/langchain.git
synced 2026-02-03 15:55:44 +00:00
x
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user