-
Notifications
You must be signed in to change notification settings - Fork 22
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
feat(perplexity): add perplexity component #861
Conversation
6f83d42
to
a622919
Compare
feat: add perplexity feat: add perplexity feat: implement perplexity api caller feat: implement perplexity chat function
2ff6002
to
49dd680
Compare
err = fmt.Errorf("failed to send request, status code: %d, body: %s", restyResp.StatusCode(), bodyBytes) | ||
job.Error.Error(ctx, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
err = fmt.Errorf("failed to send request, status code: %d, body: %s", restyResp.StatusCode(), bodyBytes) | |
job.Error.Error(ctx, err) | |
msg := fmt.Sprintf("Perplexity API responded with status %d", restyResp.StatusCode()) // Optionally add body, though it'll make the message less readable | |
err = errmsg.AddMessage(fmt.Errorf("perplexity responded with non-200 status"), msg) | |
job.Error.Error(ctx, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If Perplexity has a structured output for errors, I'd try to unmarshal the response and return to the user the key information in a well formed message. Doesn't httpclient
take care of this here?
🤖 I have created a release *beep* *boop* --- ## [0.48.0-beta](v0.47.2-beta...v0.48.0-beta) (2024-12-03) ### Features * **component,data,base:** enhance component features ([#885](#885)) ([68b396f](68b396f)) * **component,googlesheet:** implement the Google Sheet component ([#878](#878)) ([8a0ab93](8a0ab93)) * **component,instillapp:** remove instill-app component ([#911](#911)) ([4a7c970](4a7c970)) * **component,openai:** support streaming for o1-mini and o1-preview models ([#882](#882)) ([367e957](367e957)) * **component,schedule:** introduce the `schedule` component ([#900](#900)) ([9582942](9582942)) * **connection:** add lookup connection endpoint ([#888](#888)) ([86bffe8](86bffe8)) * **data:** add support for default value in `instill` Go tag ([#891](#891)) ([b9c2d05](b9c2d05)) * **leadiq:** implement leadiq component ([#874](#874)) ([78c2ec7](78c2ec7)) * **perplexity:** add perplexity component ([#861](#861)) ([1fc7dbe](1fc7dbe)) * **recipe:** separate the template and the rendered value for input and setup ([#886](#886)) ([3ec3dd6](3ec3dd6)) * **recipe:** support `required` attribute for variable ([#901](#901)) ([da7f0e9](da7f0e9)) * **service:** add the file extension to the output filename ([#873](#873)) ([22b92b0](22b92b0)) * **service:** trigger latest release version for pipeline with run-on-event setting ([#896](#896)) ([0b1c071](0b1c071)) * **smartlead:** implement smartlead ([#879](#879)) ([f6baf2a](f6baf2a)) * **text:** improve markdown chunking ([#889](#889)) ([d48b3ec](d48b3ec)) * **trigger:** accept connection references in the pipeline trigger data ([#883](#883)) ([937bd01](937bd01)) * **trigger:** enable optional values for variables ([#884](#884)) ([187f5fd](187f5fd)) * **vdp:** skip google drive for cloud version ([#899](#899)) ([5089397](5089397)) ### Bug Fixes * **ci:** use xk6-sql driver and pin down versions ([#876](#876)) ([1f64d6c](1f64d6c)) * **component,openai:** enable the use of system messages with chat history ([#905](#905)) ([ef3e66f](ef3e66f)) * **leadiq, smartlead:** change field to optional ([#892](#892)) ([9bd995d](9bd995d)) * **web:** fix url and markdown position ([#893](#893)) ([af8f412](af8f412)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Because
This commit
Note