Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
harry-cohere committed Mar 26, 2024
1 parent c047868 commit d56397c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libs/partners/cohere/langchain_cohere/multi_hop/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import re
from typing import List, Sequence, Union

from langchain.agents.agent import MultiActionAgentOutputParser
from langchain_core.agents import AgentAction, AgentFinish
from langchain_core.language_models import BaseLanguageModel
from langchain_core.output_parsers import BaseOutputParser
from langchain_core.prompts.chat import ChatPromptTemplate
from langchain_core.runnables import Runnable, RunnablePassthrough
from langchain_core.tools import BaseTool
Expand Down Expand Up @@ -45,7 +45,9 @@ def create_cohere_multi_hop_agent(
return agent


class CohereToolsMultiHopAgentOutputParser(MultiActionAgentOutputParser):
class CohereToolsMultiHopAgentOutputParser(
BaseOutputParser[Union[List[AgentAction], AgentFinish]]
):
"""Parses a message into agent actions/finish."""

@property
Expand Down

0 comments on commit d56397c

Please sign in to comment.