Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

together-ai

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

together-ai - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

4

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc