mypiper commited on
Commit
b3de068
·
verified ·
1 Parent(s): c4672f7

Update anthropic.yaml

Browse files
Files changed (1) hide show
  1. anthropic.yaml +8 -10
anthropic.yaml CHANGED
@@ -1,16 +1,17 @@
1
  _id: anthropic
2
- title: Anthropic
3
  description: Ask Claude agent
4
- version: 1
5
  readme: The first base version
 
6
  url: https://huggingface.co/PiperMy/Node-Packages/resolve/main/anthropic.yaml
 
7
  nodes:
8
  ask_claude:
9
  _id: ask_claude
10
  arrange:
11
- x: 140
12
- y: 90
13
  category:
 
14
  id: llm_agents
15
  title: en=Language Agents;ru=Языковые агенты
16
  environment:
@@ -25,6 +26,7 @@ nodes:
25
  type: string
26
  required: true
27
  multiline: true
 
28
  model:
29
  order: 2
30
  title: en=Model;ru=Модель
@@ -53,7 +55,7 @@ nodes:
53
  package: anthropic
54
  script: |
55
  export async function costs({ inputs }) {
56
- return 0.05;
57
  }
58
 
59
  export async function run({ inputs }) {
@@ -86,7 +88,7 @@ nodes:
86
  const json = answer.replace(/^\`\`\`json\s*/ig, '').replace(/\`\`\`\s*$/ig, '');
87
  return NextNode.from({ outputs: { json: JSON.parse(json) }, costs: await costs({ inputs }) });
88
  } catch (e) {
89
- log(e);
90
  message(`Wrong JSON for question \`\`\`text\n${question}\n\`\`\`\nnanswer from LLM\n\`\`\`text${answer}\n\`\`\``, 'defect');
91
  throw new FatalError("Can't parse JSON asnwer from LLM");
92
  }
@@ -97,7 +99,3 @@ nodes:
97
  source: catalog
98
  title: en=Ask Claude;ru=Спросить Claude
99
  version: 1
100
- costs: |-
101
- (() => {
102
- return 0.001;
103
- })();
 
1
  _id: anthropic
 
2
  description: Ask Claude agent
 
3
  readme: The first base version
4
+ title: Anthropic
5
  url: https://huggingface.co/PiperMy/Node-Packages/resolve/main/anthropic.yaml
6
+ version: 1
7
  nodes:
8
  ask_claude:
9
  _id: ask_claude
10
  arrange:
11
+ x: 150
12
+ y: 100
13
  category:
14
+ _id: llm_agents
15
  id: llm_agents
16
  title: en=Language Agents;ru=Языковые агенты
17
  environment:
 
26
  type: string
27
  required: true
28
  multiline: true
29
+ default: What time is it now? Only JSON ready to parse.
30
  model:
31
  order: 2
32
  title: en=Model;ru=Модель
 
55
  package: anthropic
56
  script: |
57
  export async function costs({ inputs }) {
58
+ return 0.01;
59
  }
60
 
61
  export async function run({ inputs }) {
 
88
  const json = answer.replace(/^\`\`\`json\s*/ig, '').replace(/\`\`\`\s*$/ig, '');
89
  return NextNode.from({ outputs: { json: JSON.parse(json) }, costs: await costs({ inputs }) });
90
  } catch (e) {
91
+ console.log(e);
92
  message(`Wrong JSON for question \`\`\`text\n${question}\n\`\`\`\nnanswer from LLM\n\`\`\`text${answer}\n\`\`\``, 'defect');
93
  throw new FatalError("Can't parse JSON asnwer from LLM");
94
  }
 
99
  source: catalog
100
  title: en=Ask Claude;ru=Спросить Claude
101
  version: 1