Skip to content

v0.1.2

Pre-release
Pre-release

Choose a tag to compare

@EggerMarc EggerMarc released this 21 Sep 23:32
· 42 commits to main since this release

Changelog

  1. Added FunctionResponse as the response struct of a successful tool call.
    This struct will hold id: Option<CallId>, name: String, result: Value as fields and implements serde serialization, as display, and PartialEq. The idea behind is to be able to further down the road add tracing to function calls for better management of calls, as well as improved control in serialization.

  2. Added CallId in both FunctionResponse (as stated above) and FunctionCall.
    Attaching an id to a tool call is a common practice across LLM providers, as we're able to more easily build stack traces and logging. This is a requirement to later on build tracing support.

  3. Implemented Display for FunctionResponse.

Breaking changes

  1. Call a new function call with new instead of building it out manually. new will assign an id to the FunctionCall. If you do not wish to have an id to the call, manually set it to None, as such
FunctionCall {
  None,
  name: "function_name".to_string(),
  arguments: json!({})
}
  1. Upon successful response, to get the response values themselves, call .result to FunctionResponse.

Previously, a tool call would simply result in serde::Value. Now, as stated above, you need to manually take the result field of the FunctionResponse.