Skip to content
Open
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
5 changes: 0 additions & 5 deletions templates/ts-mastraai/.actor/pay_per_event.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
{
"actor-start": {
"eventTitle": "Price for Actor start",
"eventDescription": "Flat fee for starting an Actor run.",
"eventPriceUsd": 0.1
},
"task-completed": {
"eventTitle": "Price for completing the task",
"eventDescription": "Flat fee for completing the task.",
Expand Down
6 changes: 3 additions & 3 deletions templates/ts-mastraai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
"node": ">=18.0.0"
},
"dependencies": {
"@ai-sdk/openai": "^1.2.1",
"@mastra/core": "^0.4.4",
"@ai-sdk/openai": "^2.0.3",
"@mastra/core": "^0.18.0",
"apify": "^3.4.2",
"mastra": "^0.2.8",
"mastra": "^0.13.2",
"zod": "^3.25.67"
},
"devDependencies": {
Expand Down
5 changes: 1 addition & 4 deletions templates/ts-mastraai/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ await Actor.init();
* Actor code
*/

// Charge for Actor start
await Actor.charge({ eventName: 'actor-start' });

// Handle input
const {
// The query default value is provided only for template testing purposes.
Expand All @@ -41,7 +38,7 @@ const agent = createSocialMediaAgent(modelName);
log.info(`Querying the agent with the following query: ${query}`);

// Query the agent and get the response
const response = await agent.generate([{ role: 'user', content: query }]);
const response = await agent.generateVNext([{ role: 'user', content: query }]);

log.info(`Agent response: ${response.text}`);

Expand Down
Loading