You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Jupyter AI v3, we are exploring ways to introduce multiple AI agents into the chat.
To do this, we need to define the data representation of an AI agent, and describe what it does.
Proposed Solution
A persona is a complete description of an agent which can directly accept user queries, and is treated like "just another user" in the chat.
This agent should be @-mentionable from the chat.
When a user types a new message into the chat, the persona should respond intelligently:
When there is only one user & one persona: always reply to new messages.
Otherwise: only reply when @-mentioned.
The persona should be able to fully represent Jupyternaut.
The persona should be configurable and read from the ConfigManager to allow users to override our defaults.
Proposed interface:
classPersonaDefaults(BaseModel):
# required fieldsname: str# e.g. "Jupyternaut"avatar_path: str# e.g. /avatars/jupyternaut.svgsystem_prompt: str# e.g. "You are a language model named..."slash_commands: Set[str] =set("*") # change this to enable/disable slash commands# optional fieldsmodel_uid: Optional[str] =None# e.g. "ollama:deepseek-coder-v2" # ^^^ set this to automatically default to a model after a fresh start, no config fileclassPersona(BaseModel):
id: str# e.g. 'jupyternaut'defaults: PersonaDefaultssubagents: Set[Persona]
config_manager: ConfigManager@propertydefname(self) ->str:
"""The name that users should use to `@`-mention this persona." return self.config.jupyternaut.name or self.defaults.name @property def avatar_path(self) -> str: """Thepathtothispersona'savatar, showninthechat.""" return self.config.jupyternaut.avatar_path or self.defaults.avatar_path @property def system_prompt(self) -> str: """Thesystempromptusedbythispersona.""" return self.config.jupyternaut.system_prompt or self.defaults.system_prompt @property def lc_runnable(self) -> Runnable: """TheLangChainrunnableusedtodefinetheimplementationofthispersona."""
Additional context
We will elaborate on how to extend this to build a multi-agent collaboration (MAC) experience later in a future issue.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Problem
In Jupyter AI v3, we are exploring ways to introduce multiple AI agents into the chat.
To do this, we need to define the data representation of an AI agent, and describe what it does.
Proposed Solution
A persona is a complete description of an agent which can directly accept user queries, and is treated like "just another user" in the chat.
@
-mentionable from the chat.@
-mentioned.ConfigManager
to allow users to override our defaults.Proposed interface:
Additional context
We will elaborate on how to extend this to build a multi-agent collaboration (MAC) experience later in a future issue.
The text was updated successfully, but these errors were encountered: