together-ai
Advanced tools
Comparing version 0.4.0 to 0.5.0
{ | ||
"name": "together-ai", | ||
"version": "0.4.0", | ||
"description": "A Node SDK for Together.ai.", | ||
"version": "0.5.0", | ||
"description": "Node.js SDK for Together.ai.", | ||
"author": "Hassan El Mghari (@nutlope)", | ||
@@ -6,0 +6,0 @@ "repository": "Nutlope/together-js", |
@@ -19,3 +19,3 @@ <div align="center"> | ||
Add open source LLMs to your apps in a few lines of code. Simply create a new Together.ai client, specify your preferred AI model with inputs, and get back a result. | ||
Create an account at [together.ai](https://www.together.ai/) and add the API key in. Then simply run the code snippet below with your preferred AI model and inputs to get back a reply. | ||
@@ -37,2 +37,16 @@ ```js | ||
### Streaming with LLMs | ||
If you want to stream, simply specify `stream-tokens: true`. | ||
```js | ||
const model = 'togethercomputer/llama-2-70b-chat'; | ||
const result = await together.inference(model, { | ||
prompt: 'Tell me about the history of the United States', | ||
max_tokens: 1000, | ||
stream_tokens: true, | ||
}); | ||
``` | ||
## Popular Supported Models | ||
@@ -39,0 +53,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6910
64