@@ -29,11 +29,7 @@ const client = new LlamaStackClient({
2929 apiKey: process .env [' LLAMA_STACK_CLIENT_API_KEY' ], // This is the default and can be omitted
3030});
3131
32- async function main () {
33- await client .datasetio .appendRows (' REPLACE_ME' , { rows: [{ foo: true }] });
34- }
35-
36- main ();
32+ await client .datasetio .appendRows (' REPLACE_ME' , { rows: [{ foo: true }] });
3733```
3834
3935### Request & Response types
@@ -48,12 +44,8 @@ const client = new LlamaStackClient({
4844 apiKey: process .env [' LLAMA_STACK_CLIENT_API_KEY' ], // This is the default and can be omitted
4945});
5046
51- async function main() {
52- const params: LlamaStackClient .DatasetioAppendRowsParams = { rows: [{ foo: true }] };
53- await client .datasetio .appendRows (' REPLACE_ME' , params );
54- }
55-
56- main ();
47+ const params: LlamaStackClient .DatasetioAppendRowsParams = { rows: [{ foo: true }] };
48+ await client .datasetio .appendRows (' REPLACE_ME' , params );
5749```
5850
5951Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
@@ -66,21 +58,17 @@ a subclass of `APIError` will be thrown:
6658
6759<!-- prettier-ignore -->
6860``` ts
69- async function main() {
70- const response = await client .datasetio
71- .appendRows (' REPLACE_ME' , { rows: [{ foo: true }] })
72- .catch (async (err ) => {
73- if (err instanceof LlamaStackClient .APIError ) {
74- console .log (err .status ); // 400
75- console .log (err .name ); // BadRequestError
76- console .log (err .headers ); // {server: 'nginx', ...}
77- } else {
78- throw err ;
79- }
80- });
81- }
82-
83- main ();
61+ const response = await client .datasetio
62+ .appendRows (' REPLACE_ME' , { rows: [{ foo: true }] })
63+ .catch (async (err ) => {
64+ if (err instanceof LlamaStackClient .APIError ) {
65+ console .log (err .status ); // 400
66+ console .log (err .name ); // BadRequestError
67+ console .log (err .headers ); // {server: 'nginx', ...}
68+ } else {
69+ throw err ;
70+ }
71+ });
8472```
8573
8674Error codes are as follows:
0 commit comments