@orq-ai/node 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +18 -18
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -41,10 +41,10 @@ const client = createClient({
41
41
  });
42
42
 
43
43
  generation = await client.deployments.invoke(
44
- (key = 'customer_service'),
45
- (context = { environments: 'production', country: 'NLD' }),
46
- (inputs = { firstname: 'John', city: 'New York' }),
47
- (metadata = { customer_id: 'Qwtqwty90281' })
44
+ key: 'customer_service',
45
+ context: { environments: 'production', country: 'NLD' },
46
+ inputs: { firstname: 'John', city: 'New York' },
47
+ metadata: { customer_id: 'Qwtqwty90281' },
48
48
  );
49
49
  ```
50
50
 
@@ -90,22 +90,22 @@ model if you are managing the prompt in your code.
90
90
 
91
91
  ```ts
92
92
  generation = await client.deployments.invoke(
93
- (key = 'customer_service'),
94
- (context = {
93
+ key: 'customer_service',
94
+ context:{
95
95
  language: [],
96
96
  environments: [],
97
- }),
98
- (metadata = {
97
+ },
98
+ metadata: {
99
99
  'custom-field-name': 'custom-metadata-value',
100
- }),
101
- (inputs = { firstname: 'John', city: 'New York' }),
102
- (messages = [
100
+ },
101
+ inputs:{ firstname: 'John', city: 'New York' },
102
+ messages: [
103
103
  {
104
104
  role: 'user',
105
105
  content:
106
106
  'A customer is asking about the latest software update features. Generate a detailed and informative response highlighting the key new features and improvements in the latest update.',
107
107
  },
108
- ])
108
+ ]
109
109
  );
110
110
  ```
111
111
 
@@ -176,7 +176,7 @@ examples of how to do it.
176
176
 
177
177
  ```ts
178
178
  generation.addMetrics(
179
- (choices = [
179
+ choices:[
180
180
  {
181
181
  index: 0,
182
182
  finish_reason: 'assistant',
@@ -186,7 +186,7 @@ generation.addMetrics(
186
186
  "Dear customer: Thank you for your interest in our latest software update! We're excited to share with you the new features and improvements we've rolled out. Here's what you can look forward to in this update",
187
187
  },
188
188
  },
189
- ])
189
+ ]
190
190
  );
191
191
  ```
192
192
 
@@ -197,7 +197,7 @@ a `png`.
197
197
 
198
198
  ```ts
199
199
  generation.addMetrics(
200
- (choices = [
200
+ choices: [
201
201
  {
202
202
  index: 0,
203
203
  finish_reason: 'stop',
@@ -206,7 +206,7 @@ generation.addMetrics(
206
206
  url: '<image_url>',
207
207
  },
208
208
  },
209
- ])
209
+ ]
210
210
  );
211
211
  ```
212
212
 
@@ -214,7 +214,7 @@ generation.addMetrics(
214
214
 
215
215
  ```ts
216
216
  generation.addMetrics(
217
- (choices = [
217
+ choices: [
218
218
  {
219
219
  index: 0,
220
220
  message: {
@@ -233,6 +233,6 @@ generation.addMetrics(
233
233
  },
234
234
  finish_reason: 'tool_calls',
235
235
  },
236
- ])
236
+ ]
237
237
  );
238
238
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orq-ai/node",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "orq.ai Typescript SDK",
5
5
  "author": "orq.ai",
6
6
  "homepage": "https://orq.ai",