quickagent
v1.0.4
Published
Simple npm package to call 3rd party LLM API like OpenAI
Readme
quickagent
Simple npm package to call 3rd party LLM API like OpenAI.
Features
- Easy integration with LLM APIs (e.g., OpenAI-compatible endpoints)
- Simple chat completion interface
- API key at: https://aiscanner.tech
Installation
npm install quickagentUsage
import QuickAgent from 'quickagent';
const agent = new QuickAgent({
apiKey: '',
language: 'english'
});
agent.chatCompletion({
model: 'gpt-4o',
prompt: 'hi'
}).then(console.log).catch(console.error);
API
new QuickAgent({ apiKey, language })
apiKey(string): Your API key at https://aiscanner.tech.language(string): B(string): Language to use for the conversation (e.g., "english", "vietnamese").
chatCompletion({ model, messages })
model(string): Model name (e.g.,gpt-3.5-turbo).messages(array): Array of messages, each with{ role: "user"|"assistant", content: "text" }.
License
MIT
Author
Nguyen Quang Huy
