This repository was archived by the owner on Apr 1, 2025. It is now read-only.
v1.6.0
What's Changed
- Sync from internal repo (2024-06-17) by @marcusolsson in #23
Full Changelog: v1.5.1...v1.6.0
New Features
You can now retrieve previously generated LeMUR responses using the request ID.
var response aai.LeMURTaskResponse
err := client.LeMUR.GetResponseData(ctx, requestID, &response)If you don't know the response type in advance, you can also decode the response into a map (or json.RawMessage):
var response map[string]interface{}
err := client.LeMUR.GetResponseData(ctx, requestID, &response)This release also adds information about the token usage for each LeMUR call. Available from the Usage field in the LeMUR response.
// The usage numbers for the LeMUR request
type LeMURUsage struct {
// The number of input tokens used by the model
InputTokens *int64 `json:"input_tokens,omitempty"`
// The number of output tokens generated by the model
OutputTokens *int64 `json:"output_tokens,omitempty"`
}Improvements
This release also adds some minor improvements to documentation and example code.