enrobie.plugins.ainswer package#
Subpackages#
- enrobie.plugins.ainswer.test package
Submodules#
enrobie.plugins.ainswer.ainswer module#
Functions and routines associated with Enasis Network Chatting Robie.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- async enrobie.plugins.ainswer.ainswer.ainswer_memory_delete(context: RunContext[AinswerDepends], unique: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Unique identifier for memory', metadata=[MinLen(min_length=36), MaxLen(max_length=36)])]) None[source]#
Delete the record from the historical person memorables.
Note
This tool will allow for deleting the memories for the provided username, also known as a Robie person.
- async enrobie.plugins.ainswer.ainswer.ainswer_memory_insert(context: RunContext[AinswerDepends], message: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Historical person memorable', metadata=[MinLen(min_length=1), MaxLen(max_length=400)])]) None[source]#
Insert the memory into the historical person memorables.
Do not add memories of previous questions or discussion. Do not add new memories without confirmation as there is limited storage that the person may have for memorables. Only add the memory one time after ensuring it does not already exist, using the ainswer_memory_records tool. Always confirm with the person before inserting message. Be very cautious and conservative with use of this tool, the bot is configured by default to remove older entries once the limit for the person memories has been reached!
Note
This tool will allow for inserting new memories for the provided username, also known as a Robie person.
- async enrobie.plugins.ainswer.ainswer.ainswer_memory_records(context: RunContext[AinswerDepends]) list[AinswerMemoryRecord] | None[source]#
Return the historical records for the person memorables.
Note
This tool will return historical memorable items for the provided username, also known as a Robie person.
enrobie.plugins.ainswer.common module#
Functions and routines associated with Enasis Network Chatting Robie.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- class enrobie.plugins.ainswer.common.AinswerDepends(plugin: AinswerPlugin, mitem: RobieMessage | None)[source]#
Bases:
objectDependencies related to operation with PydanticAI tools.
- mitem: RobieMessage | None#
- plugin: AinswerPlugin#
- class enrobie.plugins.ainswer.common.AinswerResponse(*, text: str)[source]#
Bases:
BaseModelContains the response for question for the client type.
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class enrobie.plugins.ainswer.common.AinswerResponseDSC(*, text: Annotated[str, MaxLen(max_length=1900)])[source]#
Bases:
AinswerResponseContains the response for question for the client type.
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class enrobie.plugins.ainswer.common.AinswerResponseIRC(*, text: Annotated[str, MaxLen(max_length=350)])[source]#
Bases:
AinswerResponseContains the response for question for the client type.
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class enrobie.plugins.ainswer.common.AinswerResponseMTM(*, text: Annotated[str, MaxLen(max_length=1900)])[source]#
Bases:
AinswerResponseContains the response for question for the client type.
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
enrobie.plugins.ainswer.helpers module#
Functions and routines associated with Enasis Network Chatting Robie.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- enrobie.plugins.ainswer.helpers.composedsc(plugin: AinswerPlugin, mitem: RobieMessage) None[source]#
Construct and format message for related chat platform.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
mitem – Item containing information for operation.
- enrobie.plugins.ainswer.helpers.composeirc(plugin: AinswerPlugin, mitem: RobieMessage) None[source]#
Construct and format message for related chat platform.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
mitem – Item containing information for operation.
- enrobie.plugins.ainswer.helpers.composemtm(plugin: AinswerPlugin, mitem: RobieMessage) None[source]#
Construct and format message for related chat platform.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
mitem – Item containing information for operation.
enrobie.plugins.ainswer.history module#
Functions and routines associated with Enasis Network Chatting Robie.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- class enrobie.plugins.ainswer.history.AinswerHistory(plugin: AinswerPlugin)[source]#
Bases:
objectStore the historical information for chat interactions.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
- expunge(client: str, kind: str, anchor: str) None[source]#
Remove the expired historical chat interaction records.
- Parameters:
client – Unique identifier for the client object.
kind – What kind of Robie message we dealing with.
anchor – Unique identifier for the chat context.
- insert(*, client: str, person: str | None, kind: str, author: str, anchor: str, message: str, ainswer: str) None[source]#
Insert the record into the historical chat interactions.
- process(mitem: RobieMessage, ainswer: str) None[source]#
Insert the record into the historical chat interactions.
- Parameters:
mitem – Item containing information for operation.
ainswer – Response from LLM relevant to question.
- records(mitem: RobieMessage, limit: int | None = None) list[AinswerHistoryRecord][source]#
Return the historical records for the chat interactions.
- Parameters:
mitem – Item containing information for operation.
limit – Optionally restrict the records returned.
- Returns:
Historical records for the chat interactions.
- search(limit: int | None = None, *, client: str | None = None, person: str | None = None, kind: str | None = None, author: str | None = None, anchor: str | None = None) list[AinswerHistoryRecord][source]#
Return the historical records for the chat interactions.
- Parameters:
limit – Optionally restrict the records returned.
- Returns:
Historical records for the chat interactions.
- class enrobie.plugins.ainswer.history.AinswerHistoryRecord(record: AinswerHistoryTable | None = None, *, plugin: Annotated[str, MinLen(min_length=1)], client: Annotated[str, MinLen(min_length=1)], person: Annotated[str | None, MinLen(min_length=1)] = None, kind: Annotated[Literal['privmsg', 'chanmsg'], MinLen(min_length=1)], author: Annotated[str, MinLen(min_length=1)], anchor: Annotated[str, MinLen(min_length=1)] = None, message: str, ainswer: str, create: Annotated[str, MinLen(min_length=20), MaxLen(max_length=32)])[source]#
Bases:
BaseModelContain the information regarding the chatting history.
- Parameters:
record – Record from the SQLAlchemy query routine.
kwargs – Keyword arguments passed for downstream.
- ainswer: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Historical interaction content')]#
- anchor: Annotated[str, FieldInfo(annotation=NoneType, required=False, default=None, description='Channel or private context', metadata=[MinLen(min_length=1)])]#
- author: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Nickname of message author', metadata=[MinLen(min_length=1)])]#
- client: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Client name where originated', metadata=[MinLen(min_length=1)])]#
- create: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='When the record was created', metadata=[MinLen(min_length=20), MaxLen(max_length=32)])]#
- kind: Annotated[Literal['privmsg', 'chanmsg'], FieldInfo(annotation=NoneType, required=True, description='What kind of original message', metadata=[MinLen(min_length=1)])]#
- message: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Historical interaction content')]#
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class enrobie.plugins.ainswer.history.AinswerHistoryTable(**kwargs)[source]#
Bases:
SQLBaseSchematic for the database operations using SQLAlchemy.
Note
Fields are not completely documented for this model.
- ainswer#
- anchor#
- author#
- client#
- create#
- kind#
- message#
- person#
- plugin#
enrobie.plugins.ainswer.memory module#
Functions and routines associated with Enasis Network Chatting Robie.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- class enrobie.plugins.ainswer.memory.AinswerMemory(plugin: AinswerPlugin)[source]#
Bases:
objectStore the historical information for the person memory.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
- delete(person: str, unique: str) None[source]#
Delete the record from the historical person memorables.
- Parameters:
person – Unique identifier for the person object.
unique – Unique identifier for person memorable.
- expunge(person: str) None[source]#
Remove the expired historical person memorable records.
- Parameters:
person – Unique identifier for the person object.
- insert(*, person: str, message: str) None[source]#
Insert the record into the historical person memorables.
- records(mitem: RobieMessage) list[AinswerMemoryRecord][source]#
Return the historical records for the person memorables.
- Parameters:
mitem – Item containing information for operation.
- Returns:
Historical records for the person memorables.
- class enrobie.plugins.ainswer.memory.AinswerMemoryRecord(record: AinswerMemoryTable | None = None, *, plugin: Annotated[str, MinLen(min_length=1)], person: Annotated[str, MinLen(min_length=1)] = None, unique: Annotated[str, MinLen(min_length=36), MaxLen(max_length=36)], message: Annotated[str, MinLen(min_length=1), MaxLen(max_length=400)], create: Annotated[str, MinLen(min_length=20), MaxLen(max_length=32)])[source]#
Bases:
BaseModelContain the information regarding the chatting history.
- Parameters:
record – Record from the SQLAlchemy query routine.
kwargs – Keyword arguments passed for downstream.
- create: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='When the record was created', metadata=[MinLen(min_length=20), MaxLen(max_length=32)])]#
- message: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Historical person memorable', metadata=[MinLen(min_length=1), MaxLen(max_length=400)])]#
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- person: Annotated[str, FieldInfo(annotation=NoneType, required=False, default=None, description='Person that author is matched', metadata=[MinLen(min_length=1)])]#
- class enrobie.plugins.ainswer.memory.AinswerMemoryTable(**kwargs)[source]#
Bases:
SQLBaseSchematic for the database operations using SQLAlchemy.
Note
Fields are not completely documented for this model.
- create#
- message#
- person#
- plugin#
- unique#
enrobie.plugins.ainswer.models module#
Functions and routines associated with Enasis Network Chatting Robie.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- class enrobie.plugins.ainswer.models.AinswerModels(plugin: AinswerPlugin)[source]#
Bases:
objectReturn the class object that was imported within method.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
- classmethod agent() Type[Agent[AinswerDepends, str]][source]#
Return the class object that was imported within method.
- property anthropic: AnthropicModel#
Return the class object that was imported within method.
- property openai: OpenAIModel#
Return the class object that was imported within method.
enrobie.plugins.ainswer.params module#
Functions and routines associated with Enasis Network Chatting Robie.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- class enrobie.plugins.ainswer.params.AinswerPluginAinswerParams(*, origin: Literal['anthropic', 'openai'], model: Annotated[str, MinLen(min_length=1)], secret: Annotated[str, MinLen(min_length=1)], timeout: Annotated[int, Ge(ge=1), Le(le=300)] = 30, sleep: tuple[int, int] = (15, 30))[source]#
Bases:
RobieParamsModelProcess and validate the Robie configuration parameters.
- model: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Platform model that will be used', metadata=[MinLen(min_length=1)])]#
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- origin: Annotated[Literal['anthropic', 'openai'], FieldInfo(annotation=NoneType, required=True, description='Which platform hosts the model')]#
- secret: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Model in platform that is used', metadata=[MinLen(min_length=1)])]#
- class enrobie.plugins.ainswer.params.AinswerPluginParams(_parse: ~typing.Callable[[...], ~typing.Any] | None = None, *, enable: bool = False, locate: ~typing.Annotated[str | None, ~annotated_types.MinLen(min_length=1)] = None, trusted: ~typing.Annotated[list[str] | None, ~annotated_types.MinLen(min_length=1)] = None, database: ~typing.Annotated[str, ~annotated_types.MinLen(min_length=1)] = 'sqlite:///:memory:', histories: ~typing.Annotated[int, ~annotated_types.Ge(ge=1), ~annotated_types.Le(le=1000)] = 10, memories: ~typing.Annotated[int, ~annotated_types.Ge(ge=1), ~annotated_types.Le(le=1000)] = 10, clients: ~typing.Annotated[list[str], ~annotated_types.MinLen(min_length=1)], ainswer: ~enrobie.plugins.ainswer.params.AinswerPluginAinswerParams, prompt: ~enrobie.plugins.ainswer.params.AinswerPluginPromptParams = <factory>, plugins: ~typing.Annotated[list[str] | None, ~annotated_types.MinLen(min_length=1)] = None, logger: ~typing.Annotated[str | None, ~annotated_types.MinLen(min_length=1)] = None, status: ~enrobie.plugins.status.params.StatusPluginIconParams = <factory>)[source]#
Bases:
RobiePluginParamsProcess and validate the Robie configuration parameters.
- ainswer: Annotated[AinswerPluginAinswerParams, FieldInfo(annotation=NoneType, required=True, description='Parameters for the AI platforms')]#
- clients: Annotated[list[str], FieldInfo(annotation=NoneType, required=True, description='List of clients to enable plugin', metadata=[MinLen(min_length=1)])]#
- database: Annotated[str, FieldInfo(annotation=NoneType, required=False, default='sqlite:///:memory:', description='Database connection string', metadata=[MinLen(min_length=1)])]#
- histories: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=10, description='Number of messages per anchor', metadata=[Ge(ge=1), Le(le=1000)])]#
- logger: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Logger for including recents', metadata=[MinLen(min_length=1)])]#
- memories: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=10, description='Number of messages per person', metadata=[Ge(ge=1), Le(le=1000)])]#
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- plugins: Annotated[list[str] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='List of plugins to load tools', metadata=[MinLen(min_length=1)])]#
- prompt: Annotated[AinswerPluginPromptParams, FieldInfo(annotation=NoneType, required=False, default_factory=AinswerPluginPromptParams, description='Override the agent system prompt')]#
- status: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per chat platform')]#
- class enrobie.plugins.ainswer.params.AinswerPluginPromptClientParams(*, dsc: Annotated[str, MinLen(min_length=1)] = 'In 1875 characters or less, answer the user question. Format for Discord. Markdown is encouraged.', irc: Annotated[str, MinLen(min_length=1)] = 'In 325 characters or less, answer the user question. Format for IRCv2. Do not use markdown. Do not use colors.', mtm: Annotated[str, MinLen(min_length=1)] = 'In 1875 characters or less, answer the user question. Format for Mattermost. Markdown is encouraged.')[source]#
Bases:
RobieParamsModelProcess and validate the Robie configuration parameters.
- dsc: Annotated[str, FieldInfo(annotation=NoneType, required=False, default='In 1875 characters or less, answer the user question. Format for Discord. Markdown is encouraged.', description='Supplement the system prompt', metadata=[MinLen(min_length=1)])]#
- irc: Annotated[str, FieldInfo(annotation=NoneType, required=False, default='In 325 characters or less, answer the user question. Format for IRCv2. Do not use markdown. Do not use colors.', description='Supplement the system prompt', metadata=[MinLen(min_length=1)])]#
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class enrobie.plugins.ainswer.params.AinswerPluginPromptParams(_parse: ~typing.Callable[[...], ~typing.Any] | None = None, *, system: ~typing.Annotated[str, ~annotated_types.MinLen(min_length=1)] = 'You are a helpful chatbot assistant named Robie. You were built by Robert, at the Enasis Network.', client: ~enrobie.plugins.ainswer.params.AinswerPluginPromptClientParams = <factory>, header: ~typing.Annotated[str | None, ~annotated_types.MinLen(min_length=1)] = None, footer: ~typing.Annotated[str | None, ~annotated_types.MinLen(min_length=1)] = None, ignore: ~typing.Annotated[list[str], ~annotated_types.MinLen(min_length=1)] = ['If you believe that you are being abused by the user asking the question.'])[source]#
Bases:
RobieParamsModelProcess and validate the Robie configuration parameters.
- client: Annotated[AinswerPluginPromptClientParams, FieldInfo(annotation=NoneType, required=False, default_factory=AinswerPluginPromptClientParams, description='Additional chat platform prompt')]#
- header: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Optional header before question', metadata=[MinLen(min_length=1)])]#
- ignore: Annotated[list[str], FieldInfo(annotation=NoneType, required=False, default=['If you believe that you are being abused by the user asking the question.'], description='Reasons for LLM to decline response', metadata=[MinLen(min_length=1)])]#
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
enrobie.plugins.ainswer.plugin module#
Functions and routines associated with Enasis Network Chatting Robie.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- class enrobie.plugins.ainswer.plugin.AinswerPlugin(robie: Robie, name: str, params: RobieChildParams)[source]#
Bases:
RobiePluginIntegrate with the Robie routine and perform operations.
Note
This plugin allows for interacting with an LLM model.
- property agent: Agent[AinswerDepends, str]#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- ainswer(mitem: RobieMessage, prompt: str, respond: Type[AinswerResponse]) str[source]#
Submit the question to the LLM and return the response.
- Parameters:
mitem – Item containing information for operation.
prompt – Additional prompt insert before question.
respond – Model to describe the expected response.
- Returns:
Response adhering to provided specifications.
- property history: AinswerHistory#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property memory: AinswerMemory#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property models: AinswerModels#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property params: AinswerPluginParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- printer(source: dict[str, Any], color: int = 6) None[source]#
Print the contents for the object within Robie instance.
- Parameters:
source – Content which will be shown after header.
color – Override the color used for box character.
- property question: AinswerQuestion#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- classmethod schema() Type[AinswerPluginParams][source]#
Return the configuration parameters relevant for class.
- Returns:
Configuration parameters relevant for class.
- property toolset: AinswerToolset#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
enrobie.plugins.ainswer.question module#
Functions and routines associated with Enasis Network Chatting Robie.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- class enrobie.plugins.ainswer.question.AinswerQuestion(plugin: AinswerPlugin)[source]#
Bases:
objectConstruct prompt and allow for interacting with the LLM.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
- prompt(mitem: RobieMessage, prompt: str) str[source]#
Return the message prefixed with runtime prompt values.
- Parameters:
mitem – Item containing information for operation.
prompt – Additional prompt insert before question.
- Returns:
Message prefixed with runtime prompt values.
- submit(prompt: str, respond: Type[AinswerResponse], mitem: RobieMessage | None = None) AinswerResponse[source]#
Submit the question to the LLM and return the response.
- Parameters:
prompt – Question that will be asked of the LLM.
respond – Model to describe the expected response.
mitem – Item containing information for operation.
- Returns:
Response adhering to provided specifications.
enrobie.plugins.ainswer.toolset module#
Functions and routines associated with Enasis Network Chatting Robie.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- class enrobie.plugins.ainswer.toolset.AinswerToolset(plugin: AinswerPlugin)[source]#
Bases:
objectEnumerate the plugins and return those that are related.
- Parameters:
plugin – Plugin class instance for Chatting Robie.
Module contents#
Functions and routines associated with Enasis Network Chatting Robie.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- class enrobie.plugins.ainswer.AinswerDepends(plugin: AinswerPlugin, mitem: RobieMessage | None)[source]#
Bases:
objectDependencies related to operation with PydanticAI tools.
- mitem: RobieMessage | None#
- plugin: AinswerPlugin#
- class enrobie.plugins.ainswer.AinswerPlugin(robie: Robie, name: str, params: RobieChildParams)[source]#
Bases:
RobiePluginIntegrate with the Robie routine and perform operations.
Note
This plugin allows for interacting with an LLM model.
- property agent: Agent[AinswerDepends, str]#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- ainswer(mitem: RobieMessage, prompt: str, respond: Type[AinswerResponse]) str[source]#
Submit the question to the LLM and return the response.
- Parameters:
mitem – Item containing information for operation.
prompt – Additional prompt insert before question.
respond – Model to describe the expected response.
- Returns:
Response adhering to provided specifications.
- property history: AinswerHistory#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property memory: AinswerMemory#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property models: AinswerModels#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property params: AinswerPluginParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- printer(source: dict[str, Any], color: int = 6) None[source]#
Print the contents for the object within Robie instance.
- Parameters:
source – Content which will be shown after header.
color – Override the color used for box character.
- property question: AinswerQuestion#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- classmethod schema() Type[AinswerPluginParams][source]#
Return the configuration parameters relevant for class.
- Returns:
Configuration parameters relevant for class.
- property toolset: AinswerToolset#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- class enrobie.plugins.ainswer.AinswerPluginParams(_parse: ~typing.Callable[[...], ~typing.Any] | None = None, *, enable: bool = False, locate: ~typing.Annotated[str | None, ~annotated_types.MinLen(min_length=1)] = None, trusted: ~typing.Annotated[list[str] | None, ~annotated_types.MinLen(min_length=1)] = None, database: ~typing.Annotated[str, ~annotated_types.MinLen(min_length=1)] = 'sqlite:///:memory:', histories: ~typing.Annotated[int, ~annotated_types.Ge(ge=1), ~annotated_types.Le(le=1000)] = 10, memories: ~typing.Annotated[int, ~annotated_types.Ge(ge=1), ~annotated_types.Le(le=1000)] = 10, clients: ~typing.Annotated[list[str], ~annotated_types.MinLen(min_length=1)], ainswer: ~enrobie.plugins.ainswer.params.AinswerPluginAinswerParams, prompt: ~enrobie.plugins.ainswer.params.AinswerPluginPromptParams = <factory>, plugins: ~typing.Annotated[list[str] | None, ~annotated_types.MinLen(min_length=1)] = None, logger: ~typing.Annotated[str | None, ~annotated_types.MinLen(min_length=1)] = None, status: ~enrobie.plugins.status.params.StatusPluginIconParams = <factory>)[source]#
Bases:
RobiePluginParamsProcess and validate the Robie configuration parameters.
- ainswer: Annotated[AinswerPluginAinswerParams, FieldInfo(annotation=NoneType, required=True, description='Parameters for the AI platforms')]#
- clients: Annotated[list[str], FieldInfo(annotation=NoneType, required=True, description='List of clients to enable plugin', metadata=[MinLen(min_length=1)])]#
- database: Annotated[str, FieldInfo(annotation=NoneType, required=False, default='sqlite:///:memory:', description='Database connection string', metadata=[MinLen(min_length=1)])]#
- histories: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=10, description='Number of messages per anchor', metadata=[Ge(ge=1), Le(le=1000)])]#
- logger: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Logger for including recents', metadata=[MinLen(min_length=1)])]#
- memories: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=10, description='Number of messages per person', metadata=[Ge(ge=1), Le(le=1000)])]#
- model_config = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- plugins: Annotated[list[str] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='List of plugins to load tools', metadata=[MinLen(min_length=1)])]#
- prompt: Annotated[AinswerPluginPromptParams, FieldInfo(annotation=NoneType, required=False, default_factory=AinswerPluginPromptParams, description='Override the agent system prompt')]#
- status: Annotated[StatusPluginIconParams, FieldInfo(annotation=NoneType, required=False, default_factory=StatusPluginIconParams, description='Icon used per chat platform')]#