okeymeta-ai-sdk 1.0.3 → 1.0.4

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.
Files changed (2) hide show
  1. package/index.d.ts +86 -15
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1,16 +1,87 @@
1
- declare module "okeymeta-ai-sdk" {
2
- export class OkeyMetaClient {
3
- constructor(options?: { auth_token?: string, headers?: object, endpoints?: object });
4
- textCompletion(params: object): Promise<any>;
5
- imageToText(params: object): Promise<any>;
6
- startConversation(model?: string, contextKey?: string): Conversation;
7
- }
8
-
9
- export function createOkeyMetaProvider(options?: { auth_token?: string, headers?: object, endpoints?: object }): OkeyMetaClient;
10
-
11
- export class Conversation {
12
- constructor(options: { client: OkeyMetaClient, model: string, contextKey?: string });
13
- setContextKey(contextKey: string): void;
14
- send(input: string, params?: object): Promise<any>;
15
- }
1
+ /**
2
+ * Type definitions for okeymeta-ai-sdk
3
+ * OkeyMeta AI SDK: Official SDK for OkeyMeta AI models, including OkeyAI—Africa's first trained AI.
4
+ * https://github.com/okeymeta/okeymeta-ai-sdk
5
+ */
6
+
7
+ export interface OkeyMetaClientOptions {
8
+ auth_token?: string;
9
+ headers?: Record<string, string>;
10
+ endpoints?: Record<string, string>;
11
+ }
12
+
13
+ export interface TextCompletionParams {
14
+ model?: string;
15
+ input: string;
16
+ contextKey?: string;
17
+ APiKey?: string;
18
+ [key: string]: any;
19
+ }
20
+
21
+ export interface ImageToTextParams {
22
+ model?: string;
23
+ input: string;
24
+ imgUrl: string;
25
+ contextKey?: string;
26
+ APiKey?: string;
27
+ deepCognition?: string;
28
+ reasoningFormat?: 'raw' | 'parsed' | 'hidden';
29
+ [key: string]: any;
30
+ }
31
+
32
+ export interface ConversationOptions {
33
+ client: OkeyMetaClient;
34
+ model: string;
35
+ contextKey?: string;
36
+ }
37
+
38
+ export interface ConversationResponse {
39
+ response: string;
40
+ API_KEY?: string;
41
+ APiKey?: string;
42
+ [key: string]: any;
43
+ }
44
+
45
+ /**
46
+ * Main OkeyMetaClient class for interacting with OkeyMeta AI models.
47
+ */
48
+ export class OkeyMetaClient {
49
+ constructor(options?: OkeyMetaClientOptions);
50
+
51
+ /**
52
+ * Generate or complete text using a specified model.
53
+ */
54
+ textCompletion(params: TextCompletionParams): Promise<ConversationResponse>;
55
+
56
+ /**
57
+ * Generate text from an image using a specified model.
58
+ */
59
+ imageToText(params: ImageToTextParams): Promise<ConversationResponse>;
60
+
61
+ /**
62
+ * Start a new conversation with a model.
63
+ */
64
+ startConversation(model?: string, contextKey?: string): Conversation;
65
+ }
66
+
67
+ /**
68
+ * Create a custom OkeyMeta provider instance (advanced usage).
69
+ */
70
+ export function createOkeyMetaProvider(options?: OkeyMetaClientOptions): OkeyMetaClient;
71
+
72
+ /**
73
+ * Conversation manager for multi-turn dialog with OkeyMeta models.
74
+ */
75
+ export class Conversation {
76
+ constructor(options: ConversationOptions);
77
+
78
+ /**
79
+ * Set or update the context key for the conversation.
80
+ */
81
+ setContextKey(contextKey: string): void;
82
+
83
+ /**
84
+ * Send a message and receive a response from the model.
85
+ */
86
+ send(input: string, params?: Record<string, any>): Promise<ConversationResponse>;
16
87
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "okeymeta-ai-sdk",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Official SDK for OkeyMeta AI models, including OkeyAI—Africa's first trained AI. Seamlessly integrate text, image, and conversational AI into any JavaScript project with enterprise-grade reliability and security.",
5
5
  "main": "src/index.js",
6
6
  "types": "index.d.ts",