Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 5 additions & 7 deletions components/anthropic/actions/chat/chat.mjs
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
import anthropic from "../../anthropic.app.mjs";
import constants from "../common/constants.mjs";

export default {
name: "Chat",
version: "0.2.0",
version: "0.2.1",
key: "anthropic-chat",
description: "The Chat API. [See the documentation](https://docs.anthropic.com/claude/reference/messages_post)",
type: "action",
props: {
anthropic,
model: {
label: "Model",
description: "Select the model to use for your query. Defaults to the latest Claude model - [see the documentation](https://docs.anthropic.com/en/docs/about-claude/models/overview) for more information",
type: "string",
options: constants.MESSAGE_MODELS,
default: constants.MESSAGE_MODELS[0].value,
propDefinition: [
anthropic,
"model",
],
},
userMessage: {
label: "User Message",
Expand Down
44 changes: 0 additions & 44 deletions components/anthropic/actions/common/constants.mjs

This file was deleted.

24 changes: 23 additions & 1 deletion components/anthropic/anthropic.app.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
import { axios } from "@pipedream/platform";

const DEFAULT_MODEL = "claude-sonnet-4-5-20250929";

export default {
type: "app",
app: "anthropic",
propDefinitions: {},
propDefinitions: {
model: {
type: "string",
label: "Model",
description: "Select the model to use. [See the documentation](https://docs.anthropic.com/en/docs/about-claude/models/overview) for more information",
default: DEFAULT_MODEL,
async options() {
const response = await this.listModels();
return response.data.map((model) => ({
label: model.display_name,
value: model.id,
}));
},
},
},
methods: {
_apiKey() {
return this.$auth.api_key;
Expand All @@ -23,6 +39,12 @@ export default {
...args,
});
},
listModels(args = {}) {
return this._makeRequest({
path: "/models",
...args,
});
},
createMessage(args = {}) {
return this._makeRequest({
path: "/messages",
Expand Down
2 changes: 1 addition & 1 deletion components/anthropic/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/anthropic",
"version": "0.2.0",
"version": "0.2.1",
"description": "Pipedream Anthropic (Claude) Components",
"main": "anthropic.app.mjs",
"keywords": [
Expand Down
Loading