Major Assistant & Tool Constructor Changes & Deployment Options v1.2 #13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Lots of small quality of life changes ( like find by id 404s ) are happening with the Assistant's API. A release out of beta feels like it is coming soon. Time to make some big changes, a huge one is the way our constructor works. When this API was beta, an assistant required a name, description, and instructions. Both Assistants & Tools have removed their (name, description, instructions) ordinal parameters in favor a single options object. Now, the constructor signature is:
Now that names are no longer unique. The question of how to treat deployments has come up. Document how to use the
id
parameter to ensure a single assistant is used for a deployment no matter how much horizontal scaling is happing. Otherwise, spinning up new cloud resources such as Lambda instances or K8s pods would result in creating a new assistant for each process. We also support a newskipUpdate
option that allows for remote configurations to be applied to new running instances. Thus allowing for new resources to leverage the remote configurations, such as model and instructions. Great for zero deployment changes. For example: