Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please update the OpenAPI spec #605

Open
laszukdawid opened this issue Nov 11, 2024 · 3 comments
Open

Please update the OpenAPI spec #605

laszukdawid opened this issue Nov 11, 2024 · 3 comments

Comments

@laszukdawid
Copy link

laszukdawid commented Nov 11, 2024

Hi, unfortunately I don't know any better communication channel than to create an issue here. If there's a preferred communication way, please let me know.

For own project (terminal-agent), I had to create Anthropic Go SDK and the best way to do that was by generating one from OpenAPI spec. In another thread, I was pointed to this repository, specifically to .stats.yaml file (https://github.com/anthropics/anthropic-sdk-typescript/blob/main/.stats.yml#L2). It's been quite helpful, so thank you have keeping it public :) (I also have updated copy of it - anthropic-openapi-spec)

As I generated the client from the spec it seems that the spec is missing some things. For one, x-api-key header is required on most of endpoints; however, it's missing from POST /v1/messages and POST /v1/complete (yes, legacy, but still in use). Likewise, endpoints paths have query param (?beta=true) which (I think!) isn't proper way of declaring the spec.

Please let me know if and how I could help :)

@RobertCraigie
Copy link
Collaborator

Hey David, have you seen the alpha Go SDK? https://github.com/anthropics/anthropic-sdk-go

endpoints paths have query param (?beta=true) which (I think!) isn't proper way of declaring the spec

you're correct it isn't the proper way of doing things but the server doesn't require the beta param like that, it's just used to have two distinct types for the beta and non-beta endpoints

@laszukdawid
Copy link
Author

Thanks @RobertCraigie for the response and pointing to the repo. Somehow I have missed it; will definitely check it out :)

Are you on the Anthropic team?

With the beta param my main concern is around using code auto-generators. Since it isn't (still need to triple check!) according to the spec, code generators I used had some issues, e.g. go client was created with duplicated entities and that's a compilation error.

My main concern is still lack of the x-api-key header. It's always easier to remove not-necessary refs, rather than add something that one doesn't know what's missing. I "figured it out" and would rather the next person not to spend that extra time cross-checking docs with specs.

@samchon
Copy link

samchon commented Nov 25, 2024

I did the same thing.

I'm trying to defining the OpenAPI specification for Claude function calling.

Only one issue is left, and it would be published soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants