Skip to content

agentai-v0.3.0

Latest

Choose a tag to compare

@AdamStrojek AdamStrojek released this 22 Oct 09:26
c5b907c

Breaking changes

See MIGRATION.md for the steps to migrate from 0.2.0, with before and after code.

  • Agent::run(model, prompt, toolbox) is replaced by agent.run(prompt).await, which returns AgentResult<D> instead of D; the model and toolbox are set with Agent::with_model and Agent::with_toolbox, or per run.
  • The agent no longer remembers earlier runs: pass the history with with_history(&history) and append result.new_messages. The system prompt is not part of the history.
  • An answer cut off by the token limit is AgentError::MaxTokens instead of AgentError::InvalidAnswer; AgentError::Llm and AgentError::ClientInit hold an LlmError.
  • Agent::new_with_provider takes a Provider instead of AdapterKind; Agent::new_with_client is removed.
  • ToolChoice and ReasoningEffort are imported from agentai.

New features

  • (agent) [breaking] streaming, caller-owned history, run details and agentai's own types (#66) (by @AdamStrojek)

Miscellaneous

Contributors