Skip to content

Commit 6386fb9

Browse files
authored
Merge branch 'master' into issue-16068
2 parents cf2591b + b4a7915 commit 6386fb9

File tree

276 files changed

+20554
-1023
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

276 files changed

+20554
-1023
lines changed

components/anthropic/actions/chat/chat.mjs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
import anthropic from "../../anthropic.app.mjs";
2-
import constants from "../common/constants.mjs";
32

43
export default {
54
name: "Chat",
6-
version: "0.2.0",
5+
version: "0.2.1",
76
key: "anthropic-chat",
87
description: "The Chat API. [See the documentation](https://docs.anthropic.com/claude/reference/messages_post)",
98
type: "action",
109
props: {
1110
anthropic,
1211
model: {
13-
label: "Model",
14-
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",
15-
type: "string",
16-
options: constants.MESSAGE_MODELS,
17-
default: constants.MESSAGE_MODELS[0].value,
12+
propDefinition: [
13+
anthropic,
14+
"model",
15+
],
1816
},
1917
userMessage: {
2018
label: "User Message",

components/anthropic/actions/common/constants.mjs

Lines changed: 0 additions & 44 deletions
This file was deleted.

components/anthropic/anthropic.app.mjs

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
11
import { axios } from "@pipedream/platform";
22

3+
const DEFAULT_MODEL = "claude-sonnet-4-5-20250929";
4+
35
export default {
46
type: "app",
57
app: "anthropic",
6-
propDefinitions: {},
8+
propDefinitions: {
9+
model: {
10+
type: "string",
11+
label: "Model",
12+
description: "Select the model to use. [See the documentation](https://docs.anthropic.com/en/docs/about-claude/models/overview) for more information",
13+
default: DEFAULT_MODEL,
14+
async options() {
15+
const response = await this.listModels();
16+
return response.data.map((model) => ({
17+
label: model.display_name,
18+
value: model.id,
19+
}));
20+
},
21+
},
22+
},
723
methods: {
824
_apiKey() {
925
return this.$auth.api_key;
@@ -23,6 +39,12 @@ export default {
2339
...args,
2440
});
2541
},
42+
listModels(args = {}) {
43+
return this._makeRequest({
44+
path: "/models",
45+
...args,
46+
});
47+
},
2648
createMessage(args = {}) {
2749
return this._makeRequest({
2850
path: "/messages",

components/anthropic/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/anthropic",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "Pipedream Anthropic (Claude) Components",
55
"main": "anthropic.app.mjs",
66
"keywords": [

components/apify/actions/get-dataset-items/get-dataset-items.mjs

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "apify-get-dataset-items",
66
name: "Get Dataset Items",
77
description: "Returns data stored in a dataset. [See the documentation](https://docs.apify.com/api/v2/dataset-items-get)",
8-
version: "0.0.3",
8+
version: "0.0.4",
99
type: "action",
1010
props: {
1111
apify,
@@ -33,48 +33,46 @@ export default {
3333
"omit",
3434
],
3535
},
36-
flatten: {
36+
offset: {
3737
propDefinition: [
3838
apify,
39-
"flatten",
39+
"offset",
4040
],
4141
},
42-
maxResults: {
42+
limit: {
4343
propDefinition: [
4444
apify,
45-
"maxResults",
45+
"limit",
4646
],
4747
},
4848
},
4949
async run({ $ }) {
5050
const params = {
5151
limit: LIMIT,
52-
offset: 0,
52+
offset: this.offset,
5353
clean: this.clean,
54-
fields: this.fields && this.fields.join(),
55-
omit: this.omit && this.omit.join(),
56-
flatten: this.flatten && this.flatten.join(),
54+
fields: this.fields,
55+
omit: this.omit,
5756
};
5857

5958
const results = [];
6059
let total;
6160

6261
do {
63-
const items = await this.apify.listDatasetItems({
64-
$,
62+
const { items } = await this.apify.listDatasetItems({
6563
datasetId: this.datasetId,
6664
params,
6765
});
6866
results.push(...items);
69-
if (results.length >= this.maxResults) {
67+
if (results.length >= this.limit) {
7068
break;
7169
}
7270
total = items?.length;
7371
params.offset += LIMIT;
7472
} while (total);
7573

76-
if (results.length > this.maxResults) {
77-
results.length = this.maxResults;
74+
if (results.length > this.limit) {
75+
results.length = this.limit;
7876
}
7977

8078
if (results.length > 0) {

0 commit comments

Comments
 (0)