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§
- chains
- Execution chains
- context
- Maintain the context for the bot.
- models
- Language models
- prompt
- Prompt generation logic
- tools
- Toolbox for sapiens
Structs§
- Invalid
Invocation Notification - Invalid invocation notification
- Invocation
Failure Notification - Invocation failure notification
- Invocation
Success Notification - Invocation success notification
- Message
Notification - A message from a scheduler
- Model
Notification - An update from the model
- Sapiens
Config - Configuration for the bot
- Step
- A step in the task
- Stop
- The task is done
- Termination
Notification - Termination notification
- Void
Task Progress Update Observer - A void observer
Enums§
- Chain
Type - Type of chain to use
- Error
- The error type for the bot
- Invocation
Result Notification - Notification of the result of a tool invocation
- Task
State - The state machine of a task
Traits§
- Runtime
Observer - Observer for the step progresses
Functions§
- run_
to_ the_ end - Run until the task is done or the maximum number of steps is reached
- wrap_
observer - Wrap an observer into the a
StrongRuntimeObserver<O>
=Arc<Mutex<O>>
Type Aliases§
- Strong
Runtime Observer - A strong reference to the observer
- Weak
Runtime Observer - A weak reference to the observer