"action" tool (function calling on the server)
louis030195 opened this issue · comments
Louis Beaumont commented
#25 prelim
i.e. same as in chatgpt ui
https://platform.openai.com/docs/actions but for assistant api
Sebastian Sosa commented
@louis030195
Here is a demo of how I got actions to work with assistant. It consists of the following steps:
- Provide a OpenAPI spec
- Generate functions from the spec (in parallel)
- Generate HTTP request functions from the spec (in parallel)
- Whenever the function from the OpenAPI spec is called, send the
args
to the generated HTTP request function. - Return the results as the tool outputs.
- Done.
As an action this whole process should happen automatically in the assistant backend.
https://gist.github.com/CakeCrusher/aad0cdb695aea7eca55d31bc801a7f83
Sebastian Sosa commented
The expectation is to be able to pass a tool like so:
client.beta.assistants.create(
name="Action assistant",
tools=[
# ...
{
"type": "action",
"openapi_spec": """
openapi: 3.0.0
...
"""
} # this tool will execute autonimously
]
)
For simplicity here are the features that I think can wait until after the initial release:
- authentication
- (more so can wait) multiple authentication schemas
- is consequential flag
- OpenAPI reference mapping
Louis Beaumont commented
should be easy to implement after merging #62
Louis Beaumont commented
done v0