Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion components/openai/actions/chat/chat.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
export default {
...common,
name: "Chat",
version: "0.2.8",
version: "0.2.9",
key: "openai-chat",
description: "The Chat API, using the `gpt-3.5-turbo` or `gpt-4` model. [See the documentation](https://platform.openai.com/docs/api-reference/chat)",
type: "action",
props: {
openai,
alert: {

Check warning on line 15 in components/openai/actions/chat/chat.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop alert must have a description. See https://pipedream.com/docs/components/guidelines/#props

Check warning on line 15 in components/openai/actions/chat/chat.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop alert must have a label. See https://pipedream.com/docs/components/guidelines/#props
type: "alert",
alertType: "info",
content: "Looking to chat with your tools? Check out our individual actions: [Chat using Web Search](https://pipedream.com/apps/openai/actions/chat-using-web-search), [Chat using File Search](https://pipedream.com/apps/openai/actions/chat-using-file-search), and [Chat using Functions](https://pipedream.com/apps/openai/actions/chat-using-functions).",
Expand Down Expand Up @@ -159,6 +159,12 @@
},
});

if (this.responseFormat === constants.CHAT_RESPONSE_FORMAT.JSON_SCHEMA.value) {
for (const choice of response.choices) {
choice.message.content = JSON.parse(choice.message.content);
}
}

if (response) {
$.export("$summary", `Successfully sent chat with id ${response.id}`);
}
Expand Down
2 changes: 1 addition & 1 deletion components/openai/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/openai",
"version": "0.10.0",
"version": "0.10.1",
"description": "Pipedream OpenAI Components",
"main": "openai.app.mjs",
"keywords": [
Expand Down
Loading