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

Derive Deserialize trait for CreateCompletionRequest #109

Closed
dr497 opened this issue Sep 16, 2023 · 2 comments
Closed

Derive Deserialize trait for CreateCompletionRequest #109

dr497 opened this issue Sep 16, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@dr497
Copy link

dr497 commented Sep 16, 2023

Currently the Deserialize trait is not derived for CreateCompletionRequest https://github.com/64bit/async-openai/blob/main/async-openai/src/types/types.rs#L53

Deriving it would make it easier to compose with this awesome crate

@64bit
Copy link
Owner

64bit commented Sep 16, 2023

I think most of the request structs do not have Deserialize because they primarily are needed to send request via Serialize, contributors in the past added Deserialize for I think chat where they need to create request from json/file.

The completion API is now marked legacy and favors chat completion in the API reference/guides. That said, PR is welcome!

@64bit 64bit added the enhancement New feature or request label Sep 16, 2023
@64bit
Copy link
Owner

64bit commented Oct 30, 2023

The OpenAI recommened Chat endpoints does have deserialization support. Since Completions is now considered legacy I'm closing this, but if its a dealbreak please feel free to leave comment or reopen.

@64bit 64bit closed this as completed Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants