Skip to content

Commit

Permalink
fix: use GuardrailsOutputParser
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu007 committed May 5, 2024
1 parent 35a7bc5 commit ac982e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/codeinterpreterapi/_patch_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
from json import JSONDecodeError
from typing import List, Union

from langchain.agents.agent import AgentOutputParser
from langchain.agents.openai_functions_agent import base
from langchain_community.output_parsers.rail_parser import GuardrailsOutputParser
from langchain_core.agents import AgentAction, AgentActionMessageLog, AgentFinish
from langchain_core.exceptions import OutputParserException
from langchain_core.messages import AIMessage, BaseMessage
from langchain_core.outputs import ChatGeneration, Generation


class OpenAIFunctionsAgentOutputParser(AgentOutputParser):
class OpenAIFunctionsAgentOutputParser(GuardrailsOutputParser):
"""Parses a message into agent action/finish.
Is meant to be used with OpenAI models, as it relies on the specific
Expand Down

0 comments on commit ac982e8

Please sign in to comment.