Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More Features #5

Merged
merged 16 commits into from
Jun 14, 2024
Merged

More Features #5

merged 16 commits into from
Jun 14, 2024

Conversation

acu192
Copy link
Member

@acu192 acu192 commented Jun 13, 2024

Agent Utils:

  • bind_model() a decorator to make invoking agents easier
  • recursive_extract_messages() to easily pull messages out of the recursive old runs
  • flat_messages to easily return the correct value from simple agents

OpenAI improvements:

  • Internal retries:
    • Tries to identify which errors are recoverable, and will retry those by default.
    • Also we have a convenient exponential_backoff_retry_delays() utility function now.
  • More flexible force_tool behavior

Caching!

  • You can now cache your agent output. Future same-input will use the cache (so you don't pay the tokens).
  • A pluggable cachine layer, so you can use whatever database you want. E.g. An in-memory "database" is built-in if you want to do that.

acu192 added 15 commits June 13, 2024 08:55
- move MockProvider into the library
- add a method `Model.config_hash()`
- the caching decorator now uses `Model.config_hash()` to encode the
  model's configuration into the cache key
- easier interface to `recursive_hash()` because it has a default
  algorithm now
@acu192 acu192 changed the title More Small Features More Features Jun 14, 2024
@acu192 acu192 marked this pull request as ready for review June 14, 2024 19:09
@acu192 acu192 merged commit 17e5e91 into main Jun 14, 2024
3 checks passed
@acu192 acu192 deleted the more branch June 14, 2024 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant