Basic Alhazen Agent / Chatbot.

Building a simple application to allow the user to chat to Alhazen.

source

JSONAgentOutputParser_withFixes

 JSONAgentOutputParser_withFixes (name:Optional[str]=None)

modified from JSONAgentOutputParser to deal with escaped underscore characters.


source

create_structured_chat_agent_withFixes

 create_structured_chat_agent_withFixes
                                         (llm:langchain_core.language_mode
                                         ls.base.BaseLanguageModel, tools:
                                         Sequence[langchain_core.tools.Bas
                                         eTool], prompt:langchain_core.pro
                                         mpts.chat.ChatPromptTemplate)

modified from create_structured_chat_agent to deal with escaped underscore characters.


source

AlhazenAgent

 AlhazenAgent (agent_llm, tool_llm, db_name, sml=None, verbose=True,
               return_intermediate_steps=True)

The base Alhazen agent.