@kevisual/query 0.0.8 → 0.0.9-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/query-ai.d.ts +26 -0
- package/dist/query-ai.js +5511 -0
- package/package.json +10 -4
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import OpenAI, { ClientOptions } from 'openai';
|
|
2
|
+
export { default as OpenAI } from 'openai';
|
|
3
|
+
import { RequestOptions } from 'openai/core.mjs';
|
|
4
|
+
|
|
5
|
+
type QueryOpts = {
|
|
6
|
+
/**
|
|
7
|
+
* OpenAI model name, example: deepseek-chat
|
|
8
|
+
*/
|
|
9
|
+
model: string;
|
|
10
|
+
/**
|
|
11
|
+
* OpenAI client options
|
|
12
|
+
* QueryAi.init() will be called with these options
|
|
13
|
+
*/
|
|
14
|
+
openAiOpts?: ClientOptions;
|
|
15
|
+
openai?: OpenAI;
|
|
16
|
+
};
|
|
17
|
+
declare class QueryAI {
|
|
18
|
+
private openai;
|
|
19
|
+
model?: string;
|
|
20
|
+
constructor(opts?: QueryOpts);
|
|
21
|
+
init(opts: ClientOptions): void;
|
|
22
|
+
query(prompt: string, opts?: RequestOptions): Promise<any>;
|
|
23
|
+
queryAsync(prompt: string, opts?: RequestOptions): Promise<any>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { QueryAI };
|