How to implement the response in frontend?

how to show the AI return answer properly as the user asked in frontend. If you have any library or docs to implement in frontend regarding the table and graph?

normally, you have two way to do that, use agent(like langchain) ask ai collect all data and response in an constructed json format, then you frontend can easly render graph or table with ui lib. another way, with other graph ai ability(sd, dall-e model) generate image from your ai response and save to static path , then response to frontend with formatted markdown data

thanks for the reply, is there any reference, because we get the paid solution for this, any open source or article

You can search for at Openai Cookbook

If you can’t find please come back here. We will help you.

1 Like