motleycrew.applications.research_agent.question_answerer
Functions
|
|
|
Classes
|
Tool to answer a question based on the notes and sub-questions. |
|
- class motleycrew.applications.research_agent.question_answerer.AnswerSubQuestionTool(graph: MotleyGraphStore, answer_length: int, prompt: str | BasePromptTemplate = None, llm: BaseLanguageModel | None = None)
Bases:
MotleyToolTool to answer a question based on the notes and sub-questions.
- __init__(graph: MotleyGraphStore, answer_length: int, prompt: str | BasePromptTemplate = None, llm: BaseLanguageModel | None = None)
Initialize the MotleyTool.
- Parameters:
name – Name of the tool (required if tool is None).
description – Description of the tool (required if tool is None).
args_schema – Schema of the tool arguments (required if tool is None).
tool – Langchain BaseTool to wrap.
return_direct – If True, the tool’s output will be returned directly to the user.
exceptions_to_reflect – List of exceptions to reflect back to the agent.
retry_config – Configuration for retry behavior. If None, exceptions will not be retried.
- class motleycrew.applications.research_agent.question_answerer.QuestionAnswererInput(*, question: Question)
Bases:
BaseModel- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'question': FieldInfo(annotation=Question, required=True, description='Question node to process.')}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- motleycrew.applications.research_agent.question_answerer.get_subquestions(graph: MotleyGraphStore, question: Question) list[Question]
- motleycrew.applications.research_agent.question_answerer.create_answer_question_langchain_tool(graph: MotleyGraphStore, answer_length: int, prompt: str | BasePromptTemplate = None, llm: BaseLanguageModel | None = None) Tool