4 Commits

Author SHA1 Message Date
8b79cd025a 0.0.8 2024-04-01 03:00:24 +02:00
268178f024 fix(core): update 2024-04-01 03:00:23 +02:00
181193352e 0.0.7 2024-03-31 01:34:52 +01:00
616ef168a5 fix(core): update 2024-03-31 01:34:52 +01:00
4 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@push.rocks/smartai",
"version": "0.0.6",
"version": "0.0.8",
"private": false,
"description": "a standardaized interface to talk to AI models",
"main": "dist_ts/index.js",

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartai',
version: '0.0.6',
version: '0.0.8',
description: 'a standardaized interface to talk to AI models'
}

View File

@ -58,7 +58,7 @@ export class OpenAiProvider extends MultiModal {
}[]
) {
const result = await this.openAiApiClient.chat.completions.create({
model: 'gpt-3.5-turbo-16k-0613',
model: 'gpt-4-turbo-preview',
messages: [
{ role: 'system', content: systemMessage },
...messageHistory,

View File

@ -1,10 +1,10 @@
type TProcessFunction = (input: string) => Promise<string>;
interface ISmartAiOptions {
export interface ISmartAiOptions {
processFunction: TProcessFunction;
}
class SmartAi {
export class SmartAi {
private processFunction: TProcessFunction;
private inputStreamWriter: WritableStreamDefaultWriter<string> | null = null;
private outputStreamController: ReadableStreamDefaultController<string> | null = null;