Skip to content

Commit

Permalink
update: release v1.7.7
Browse files Browse the repository at this point in the history
  • Loading branch information
POPPIN-FUMI committed Nov 7, 2023
1 parent 0bf43f2 commit cbd7d13
Show file tree
Hide file tree
Showing 34 changed files with 50 additions and 51 deletions.
7 changes: 2 additions & 5 deletions dist/lib/genPrompt.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { VertexPromptParams } from './types';
import { ChatCompletionMessageParam } from 'openai/resources';
import { OpenAIPromptParams, VertexPromptParams } from './types';
/**
* Represents the AI platforms supported by the generatePrompt function.
*/
Expand Down Expand Up @@ -30,9 +29,7 @@ export interface AIPrompt {
*/
examples: AIExample[];
}
export declare function generatePrompt(context: string, examples: AIExample[], content: string, ai: AIType): VertexPromptParams | {
messages: ChatCompletionMessageParam[];
};
export declare function generatePrompt(context: string, examples: AIExample[], content: string, ai: AIType): VertexPromptParams | OpenAIPromptParams;
export declare const migrationPrompt: {
context: string;
examples: {
Expand Down
3 changes: 1 addition & 2 deletions dist/lib/openai/openAi.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { OpenAI as OpenAIApi } from 'openai';
import { OpenAIOptions } from '@/lib/types/openaiTypes';
import { AIPromptable } from '@/lib/skeetai';
import { ChatCompletionMessageParam } from 'openai/resources/chat';
import { Stream } from 'openai/streaming';
export declare class OpenAI implements AIPromptable {
private options;
Expand All @@ -10,7 +9,7 @@ export declare class OpenAI implements AIPromptable {
prompt(promptParams: any): Promise<string>;
chat(content: string): Promise<string>;
generateTitle(content: string): Promise<string>;
promptStream(prompt: ChatCompletionMessageParam[]): Promise<Stream<OpenAIApi.Chat.Completions.ChatCompletionChunk>>;
promptStream(prompt: any): Promise<Stream<OpenAIApi.Chat.Completions.ChatCompletionChunk>>;
uploadFile(filePath: string): Promise<OpenAIApi.Files.FileObject>;
createFineTuningJob(fileId: string, model?: string): Promise<OpenAIApi.FineTuning.Jobs.FineTuningJob>;
showFineTuningJob(jobId: string): Promise<OpenAIApi.FineTuning.Jobs.FineTuningJob>;
Expand Down
3 changes: 2 additions & 1 deletion dist/lib/types/openaiTypes.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ChatCompletionMessageParam } from 'openai/resources';
export type OpenAIPromptParams = {
messages: OpenAIMessage[];
messages: ChatCompletionMessageParam[];
};
export type OpenAIOptions = {
organizationKey?: string;
Expand Down
2 changes: 1 addition & 1 deletion dist/lib/version.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const VERSION = "1.7.6";
export declare const VERSION = "1.7.7";
4 changes: 2 additions & 2 deletions docs/classes/OpenAI-1.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/classes/SkeetAI.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/classes/VertexAI.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/enums/InstanceType.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/enums/NamingEnum.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/enums/SkeetAiMode.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/functions/generatePrompt.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/functions/translate.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/interfaces/AIPrompt.html

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions docs/interfaces/SkeetAIOptions.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/types/AIExample.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/types/AIType.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/types/AiInstance.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/types/Example.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/types/InputOutput.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/types/OpenAIMessage.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/types/OpenAIOptions.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/types/OpenAIPromptParams.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/types/OpenAIRole.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/types/VertexAiOptions.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/types/VertexExample.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/types/VertexExampleMessage.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/types/VertexMessage.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/types/VertexParameterParams.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/types/VertexPromptParams.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@skeet-framework/ai",
"version": "1.7.6",
"version": "1.7.7",
"description": "Skeet Framework Plugin - AI",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/genPrompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function generatePrompt(
examples: AIExample[],
content: string,
ai: AIType,
): VertexPromptParams | { messages: ChatCompletionMessageParam[] } {
): VertexPromptParams | OpenAIPromptParams {
if (ai === 'VertexAI') {
const exampleMessages = []
for (const example of examples) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/openai/openAi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export class OpenAI implements AIPromptable {
}
}

async promptStream(prompt: ChatCompletionMessageParam[]) {
async promptStream(prompt: any) {
try {
const openaiConfig = {
model: this.options.model!,
Expand Down
4 changes: 3 additions & 1 deletion src/lib/types/openaiTypes.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { ChatCompletionMessageParam } from 'openai/resources'

export type OpenAIPromptParams = {
messages: OpenAIMessage[]
messages: ChatCompletionMessageParam[]
}

export type OpenAIOptions = {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '1.7.6'
export const VERSION = '1.7.7'

0 comments on commit cbd7d13

Please sign in to comment.