Expand description
Sapiens library
Sapiens uses tools to interact with the world.
An experiment with handing over the tools to the machine.
Overview
This library is the core of Sapiens. It contains the logic for the interaction between the user, the language model and the tools.
More information
See https://github.com/ssoudan/sapiens/tree/main/sapiens_cli for an example of usage or https://github.com/ssoudan/sapiens/tree/main/sapiens_bot for a Discord bot.
https://github.com/ssoudan/sapiens/tree/main/sapiens_exp is a framework to run experiments and collect traces of the interactions between the language model and the tools to accomplish a task.
A collection of tools is defined in https://github.com/ssoudan/sapiens/tree/main/sapiens_tools.
Modules
- Execution chains
- Maintain the context for the bot.
- Language models
- Prompt generation logic
- Toolbox for sapiens
Structs
- Invalid invocation notification
- Invocation failure notification
- Invocation success notification
- A message from a scheduler
- An update from the model
- Configuration for the bot
- A step in the task
- The task is done
- Termination notification
- A void observer
Enums
- Type of chain to use
- The error type for the bot
- Notification of the result of a tool invocation
- The state machine of a task
Traits
- Observer for the step progresses
Functions
- Run until the task is done or the maximum number of steps is reached
- Wrap an observer into the a
StrongRuntimeObserver<O>
=Arc<Mutex<O>>
Type Aliases
- A strong reference to the observer
- A weak reference to the observer