Deep researcher
Defines a base class for deep researchers used in Gen AI applications.
References
NONE
BaseDeepResearcher(streamable=True)
Bases: ABC, Component
An abstract base class for the deep researchers used in Gen AI applications.
The BaseDeepResearcher class provides a framework for conducting deep research on a given context.
It is an abstract base class that must be subclassed to implement the research method.
Attributes:
| Name | Type | Description |
|---|---|---|
streamable |
bool
|
Whether the deep research will be streamed if an event emitter is provided. |
Initializes a new instance of the BaseDeepResearcher class.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
streamable
|
bool
|
Whether the deep research will be streamed if an event emitter is provided. Defaults to True. |
True
|
research(query, history=None, extra_contents=None, hyperparameters=None, event_emitter=None, **kwargs)
abstractmethod
async
Researches the context.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
str
|
The query to research. |
required |
history
|
list[Message] | None
|
The conversation history to be considered in the research. Defaults to None. |
None
|
extra_contents
|
list[MessageContent] | None
|
A list of extra contents to be included as inputs. Defaults to None. |
None
|
hyperparameters
|
dict[str, Any] | None
|
The hyperparameters to be passed to the language model. Defaults to None. |
None
|
event_emitter
|
EventEmitter | None
|
The event emitter to be used to stream the research. Defaults to None. |
None
|
**kwargs
|
Any
|
Additional keyword arguments to be passed to the research method. |
{}
|
Returns:
| Name | Type | Description |
|---|---|---|
LMOutput |
LMOutput
|
The output from the language model. |