
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@sumor/llm-connector
Advanced tools
A Sumor Cloud Tool.
More Documentation
This is a llm connector for multiple cloud providers.
OpenAI is a research lab consisting of the for-profit OpenAI LP and the non-profit OpenAI Inc. The company aims to ensure that artificial general intelligence benefits all of humanity.
Alibaba Qianwen is a cloud-based AI service that provides a variety of AI capabilities, including natural language processing, computer vision, and machine learning.
npm i @sumor/llm-connector --save
Require Node.JS version 18.x or above
As this package is written in ES module,
please change the following code in your package.json
file:
{
"type": "module"
}
import Model from '@sumor/llm-connector'
const model = new Model({
type: 'openAI', // or 'qianWen'
key: '123'
})
const response = await model.chat('gpt-3.5-turbo', [
{
role: 'system',
content: 'You are a helpful assistant.'
},
{
role: 'user',
content: 'Hello'
}
])
console.log(response)
// Output: { role: 'assistant', content: 'Hello, how can I help you today?' }
import Model from '@sumor/llm-connector'
const model = new Model({
type: 'openAI', // or 'qianWen'
key: '123'
})
const response = await model.image('dall-e-3', 'a painting of a flower vase', '1024x1024')
console.log(response)
// Output: https://oaidalleapiprodscus.blob.core.windows.net/private/org-B7O45Q0iSubrkWb...
import Model from '@sumor/llm-connector'
const model = new Model({
type: 'openAI',
key: '123',
endpoint: 'https://api.openai.com',
chat: '/v1/chat',
image: '/v1/image'
})
FAQs
This is a llm connector for multiple cloud providers.
We found that @sumor/llm-connector demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.