Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
8b79cd025a | |||
268178f024 | |||
181193352e | |||
616ef168a5 |
@ -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",
|
||||
|
@ -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'
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user