together-ai 0.5.0 → 0.5.1
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.
- package/README.md +7 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,15 +38,19 @@ const result = await together.inference(model, {
|
|
|
38
38
|
If you want to stream, simply specify `stream-tokens: true`.
|
|
39
39
|
|
|
40
40
|
```js
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
const result = await together.inference(model, {
|
|
41
|
+
const result = await together.inference('togethercomputer/llama-2-70b-chat', {
|
|
44
42
|
prompt: 'Tell me about the history of the United States',
|
|
45
43
|
max_tokens: 1000,
|
|
46
44
|
stream_tokens: true,
|
|
47
45
|
});
|
|
48
46
|
```
|
|
49
47
|
|
|
48
|
+
### Example Chat App
|
|
49
|
+
|
|
50
|
+
You can see an example of this library being used in a chat app here: https://simple-ai-chat.vercel.app.
|
|
51
|
+
|
|
52
|
+
The code for the example is also available. This includes code on how to stream the results of the LLM directly to the frontend: https://github.com/Nutlope/chat
|
|
53
|
+
|
|
50
54
|
## Popular Supported Models
|
|
51
55
|
|
|
52
56
|
This is a list of popular models that are supported.
|