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

[Question] what is response_model ? #78

Open
dcsan opened this issue Nov 18, 2023 · 1 comment
Open

[Question] what is response_model ? #78

dcsan opened this issue Nov 18, 2023 · 1 comment

Comments

@dcsan
Copy link

dcsan commented Nov 18, 2023

Hi! can someone explain what the response_model param used here is:

https://github.com/yoheinakajima/instagraph/blob/main/main.py#L144C18-L144C18

this seems to format the response in exactly the data structure of the models provided.
Is this an openAI thing, or part of fast API? I can't find any docs on openAI's site.

https://platform.openai.com/docs/api-reference/chat

If its an openAI thing perhaps its also magically reading the heredoc of the python classes?

I'm actually trying to use the API via typescript, so I was wondering what the parallel might be.

@dcsan dcsan changed the title [Question] response_model [Question] what is response_model ? Nov 18, 2023
@dcsan
Copy link
Author

dcsan commented Nov 18, 2023

aha!
#38

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

1 participant