@@ -77,35 +77,6 @@ const chatCompletion: Together.Chat.ChatCompletion = await client.chat.completio
7777
7878Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
7979
80- ## File uploads
81-
82- Request parameters that correspond to file uploads can be passed in many different forms:
83-
84- - ` File ` (or an object with the same structure)
85- - a ` fetch ` ` Response ` (or an object with the same structure)
86- - an ` fs.ReadStream `
87- - the return value of our ` toFile ` helper
88-
89- ``` ts
90- import fs from ' fs' ;
91- import Together , { toFile } from ' together-ai' ;
92-
93- const client = new Together ();
94-
95- // If you have access to Node `fs` we recommend using `fs.createReadStream()`:
96- await client .audio .transcriptions .create ({ file: fs .createReadStream (' /path/to/file' ) });
97-
98- // Or if you have the web `File` API you can pass a `File` instance:
99- await client .audio .transcriptions .create ({ file: new File ([' my bytes' ], ' file' ) });
100-
101- // You can also pass a `fetch` `Response`:
102- await client .audio .transcriptions .create ({ file: await fetch (' https://somesite/file' ) });
103-
104- // Finally, if none of the above are convenient, you can use our `toFile` helper:
105- await client .audio .transcriptions .create ({ file: await toFile (Buffer .from (' my bytes' ), ' file' ) });
106- await client .audio .transcriptions .create ({ file: await toFile (new Uint8Array ([0 , 1 , 2 ]), ' file' ) });
107- ```
108-
10980## Handling errors
11081
11182When the library is unable to connect to the API,
0 commit comments