mypiper commited on
Commit
4fe2630
·
verified ·
1 Parent(s): 38d7c80

Update together.yaml

Browse files
Files changed (1) hide show
  1. together.yaml +74 -4
together.yaml CHANGED
@@ -1,16 +1,16 @@
1
  _id: together_ai
2
  author: Anton Breslavskii | https://github.com/breslavsky
3
- description: ""
4
  readme: ""
5
  title: Together AI
6
  url: https://huggingface.co/PiperMy/Node-Packages/resolve/main/together.yaml
7
- version: 2
8
  nodes:
9
  generate_flux_together_ai:
10
  _id: generate_flux_together_ai
11
  arrange:
12
- x: 140
13
- y: 120
14
  category:
15
  _id: generate_images
16
  title: en=Generate images;ru=Генерация изображений
@@ -61,3 +61,73 @@ nodes:
61
  source: catalog
62
  title: en=Generate Flux Free;ru=Генерация Flux бесплатно
63
  version: 1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  _id: together_ai
2
  author: Anton Breslavskii | https://github.com/breslavsky
3
+ description: AI models with scalable cloud inference
4
  readme: ""
5
  title: Together AI
6
  url: https://huggingface.co/PiperMy/Node-Packages/resolve/main/together.yaml
7
+ version: 5
8
  nodes:
9
  generate_flux_together_ai:
10
  _id: generate_flux_together_ai
11
  arrange:
12
+ x: 130
13
+ y: 80
14
  category:
15
  _id: generate_images
16
  title: en=Generate images;ru=Генерация изображений
 
61
  source: catalog
62
  title: en=Generate Flux Free;ru=Генерация Flux бесплатно
63
  version: 1
64
+ execution: deferred
65
+ ask_deepseek_r1_together_ai:
66
+ _id: ask_deepseek_r1_together_ai
67
+ arrange:
68
+ x: 460
69
+ y: 80
70
+ category:
71
+ _id: llm_agents
72
+ title: en=Language Agents;ru=Языковые агенты
73
+ environment:
74
+ TOGETHER_API_KEY:
75
+ title: Together API key
76
+ type: string
77
+ scope: global
78
+ execution: deferred
79
+ inputs:
80
+ instructions:
81
+ order: 1
82
+ title: en=Instructions;ru=Инструкции
83
+ type: string
84
+ multiline: true
85
+ placeholder: en=Leave empty if you don't need it;ru=Оставьте пустым если не требуется
86
+ question:
87
+ order: 2
88
+ title: en=Question;ru=Вопрос
89
+ type: string
90
+ required: true
91
+ multiline: true
92
+ default: What is your name?
93
+ outputs:
94
+ answer:
95
+ title: en=Answer;ru=Ответ
96
+ type: string
97
+ package: together_ai
98
+ script: |-
99
+ export async function run({ inputs }) {
100
+
101
+ const { FatalError, NextNode } = DEFINITIONS;
102
+ const { instructions, question } = inputs;
103
+
104
+ const TOGETHER_API_KEY = env?.variables?.get('TOGETHER_API_KEY');
105
+ if (!TOGETHER_API_KEY) {
106
+ throw new FatalError('Please, set your API key for Together AI');
107
+ }
108
+
109
+ const Together = require('together-ai');
110
+ const together = new Together({ apiKey: TOGETHER_API_KEY });
111
+
112
+ const { choices } = await together.chat.completions.create({
113
+ model: "deepseek-ai/DeepSeek-R1-Distill-Llama-70B-free",
114
+ messages: [
115
+ ...(!!instructions ? [{
116
+ role: 'system',
117
+ content: instructions
118
+ }] : []),
119
+ ...[
120
+ {
121
+ role: 'user',
122
+ content: question || 'Are you AI?'
123
+ }
124
+ ]
125
+ ]
126
+ });
127
+ const [{ message: { content: answer } }] = choices;
128
+ return NextNode.from({ outputs: { answer } });
129
+
130
+ }
131
+ source: catalog
132
+ title: en=Ask DeepSeek-R1 free;ru=Спросить DeepSeek-R1 беспл.
133
+ version: 1