Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
a0228a0abc | |||
a5257b52e7 | |||
a4144fc071 | |||
af46b3e81e | |||
d50427937c | |||
ffde2e0bf1 |
12
package.json
12
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@push.rocks/smartai",
|
"name": "@push.rocks/smartai",
|
||||||
"version": "0.0.13",
|
"version": "0.0.16",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "A TypeScript library for integrating and interacting with multiple AI models, offering capabilities for chat and potentially audio responses.",
|
"description": "A TypeScript library for integrating and interacting with multiple AI models, offering capabilities for chat and potentially audio responses.",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
@ -14,24 +14,24 @@
|
|||||||
"buildDocs": "(tsdoc)"
|
"buildDocs": "(tsdoc)"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@git.zone/tsbuild": "^2.1.25",
|
"@git.zone/tsbuild": "^2.1.76",
|
||||||
"@git.zone/tsbundle": "^2.0.5",
|
"@git.zone/tsbundle": "^2.0.5",
|
||||||
"@git.zone/tsrun": "^1.2.46",
|
"@git.zone/tsrun": "^1.2.46",
|
||||||
"@git.zone/tstest": "^1.0.90",
|
"@git.zone/tstest": "^1.0.90",
|
||||||
"@push.rocks/qenv": "^6.0.5",
|
"@push.rocks/qenv": "^6.0.5",
|
||||||
"@push.rocks/tapbundle": "^5.0.23",
|
"@push.rocks/tapbundle": "^5.0.23",
|
||||||
"@types/node": "^20.12.7"
|
"@types/node": "^20.12.12"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@anthropic-ai/sdk": "^0.20.7",
|
"@anthropic-ai/sdk": "^0.21.0",
|
||||||
"@push.rocks/smartarray": "^1.0.8",
|
"@push.rocks/smartarray": "^1.0.8",
|
||||||
"@push.rocks/smartfile": "^11.0.14",
|
"@push.rocks/smartfile": "^11.0.14",
|
||||||
"@push.rocks/smartpath": "^5.0.18",
|
"@push.rocks/smartpath": "^5.0.18",
|
||||||
"@push.rocks/smartpdf": "^3.1.5",
|
"@push.rocks/smartpdf": "^3.1.6",
|
||||||
"@push.rocks/smartpromise": "^4.0.3",
|
"@push.rocks/smartpromise": "^4.0.3",
|
||||||
"@push.rocks/smartrequest": "^2.0.22",
|
"@push.rocks/smartrequest": "^2.0.22",
|
||||||
"@push.rocks/webstream": "^1.0.8",
|
"@push.rocks/webstream": "^1.0.8",
|
||||||
"openai": "^4.38.5"
|
"openai": "^4.47.1"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
7277
pnpm-lock.yaml
generated
7277
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -25,7 +25,7 @@ tap.test('should create chat response with openai', async () => {
|
|||||||
],
|
],
|
||||||
});
|
});
|
||||||
console.log(`userMessage: ${userMessage}`);
|
console.log(`userMessage: ${userMessage}`);
|
||||||
console.log(response.message.content);
|
console.log(response.message);
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should document a pdf', async () => {
|
tap.test('should document a pdf', async () => {
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@push.rocks/smartai',
|
name: '@push.rocks/smartai',
|
||||||
version: '0.0.13',
|
version: '0.0.16',
|
||||||
description: 'A TypeScript library for integrating and interacting with multiple AI models, offering capabilities for chat and potentially audio responses.'
|
description: 'A TypeScript library for integrating and interacting with multiple AI models, offering capabilities for chat and potentially audio responses.'
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ export class OpenAiProvider extends MultiModalModel {
|
|||||||
}[];
|
}[];
|
||||||
}) {
|
}) {
|
||||||
const result = await this.openAiApiClient.chat.completions.create({
|
const result = await this.openAiApiClient.chat.completions.create({
|
||||||
model: 'gpt-4-turbo-preview',
|
model: 'gpt-4o',
|
||||||
|
|
||||||
messages: [
|
messages: [
|
||||||
{ role: 'system', content: optionsArg.systemMessage },
|
{ role: 'system', content: optionsArg.systemMessage },
|
||||||
@ -102,7 +102,7 @@ export class OpenAiProvider extends MultiModalModel {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const result = await this.openAiApiClient.chat.completions.create({
|
const result = await this.openAiApiClient.chat.completions.create({
|
||||||
model: 'gpt-4-vision-preview',
|
model: 'gpt-4o',
|
||||||
// response_format: { type: "json_object" }, // not supported for now
|
// response_format: { type: "json_object" }, // not supported for now
|
||||||
messages: [
|
messages: [
|
||||||
{ role: 'system', content: optionsArg.systemMessage },
|
{ role: 'system', content: optionsArg.systemMessage },
|
||||||
|
Reference in New Issue
Block a user