expo-ai-kit 0.1.0

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/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # expo-ai-kit
2
+
3
+ Expo AI Kit module
4
+
5
+ # API documentation
6
+
7
+ - [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/ai-kit/)
8
+ - [Documentation for the main branch](https://docs.expo.dev/versions/unversioned/sdk/ai-kit/)
9
+
10
+ # Installation in managed Expo projects
11
+
12
+ For [managed](https://docs.expo.dev/archive/managed-vs-bare/) Expo projects, please follow the installation instructions in the [API documentation for the latest stable release](#api-documentation). If you follow the link and there is no documentation available then this library is not yet usable within managed projects — it is likely to be included in an upcoming Expo SDK release.
13
+
14
+ # Installation in bare React Native projects
15
+
16
+ For bare React Native projects, you must ensure that you have [installed and configured the `expo` package](https://docs.expo.dev/bare/installing-expo-modules/) before continuing.
17
+
18
+ ### Add the package to your npm dependencies
19
+
20
+ ```
21
+ npm install expo-ai-kit
22
+ ```
23
+
24
+ ### Configure for Android
25
+
26
+
27
+
28
+
29
+ ### Configure for iOS
30
+
31
+ Run `npx pod-install` after installing the npm package.
32
+
33
+ # Contributing
34
+
35
+ Contributions are very welcome! Please refer to guidelines described in the [contributing guide]( https://github.com/expo/expo#contributing).
@@ -0,0 +1,15 @@
1
+ import type { LLMMessage, LLMOptions } from './types';
2
+ export type ExpoAiKitNativeModule = {
3
+ prepareModel(options?: {
4
+ model?: string;
5
+ }): Promise<void>;
6
+ createSession(options?: {
7
+ systemPrompt?: string;
8
+ }): Promise<string>;
9
+ sendMessage(sessionId: string, messages: LLMMessage[], options?: LLMOptions): Promise<{
10
+ reply: string;
11
+ }>;
12
+ };
13
+ declare const NativeModule: ExpoAiKitNativeModule;
14
+ export default NativeModule;
15
+ //# sourceMappingURL=ExpoAiKitModule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoAiKitModule.d.ts","sourceRoot":"","sources":["../src/ExpoAiKitModule.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEtD,MAAM,MAAM,qBAAqB,GAAG;IAClC,YAAY,CAAC,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,aAAa,CAAC,OAAO,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACpE,WAAW,CACT,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,UAAU,EAAE,EACtB,OAAO,CAAC,EAAE,UAAU,GACnB,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC/B,CAAC;AAEF,QAAA,MAAM,YAAY,EAAE,qBACqC,CAAC;AAE1D,eAAe,YAAY,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { requireNativeModule } from 'expo-modules-core';
2
+ const NativeModule = requireNativeModule('ExpoAiKit');
3
+ export default NativeModule;
4
+ //# sourceMappingURL=ExpoAiKitModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoAiKitModule.js","sourceRoot":"","sources":["../src/ExpoAiKitModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAaxD,MAAM,YAAY,GAChB,mBAAmB,CAAwB,WAAW,CAAC,CAAC;AAE1D,eAAe,YAAY,CAAC","sourcesContent":["import { requireNativeModule } from 'expo-modules-core';\nimport type { LLMMessage, LLMOptions } from './types';\n\nexport type ExpoAiKitNativeModule = {\n prepareModel(options?: { model?: string }): Promise<void>;\n createSession(options?: { systemPrompt?: string }): Promise<string>;\n sendMessage(\n sessionId: string,\n messages: LLMMessage[],\n options?: LLMOptions\n ): Promise<{ reply: string }>;\n};\n\nconst NativeModule: ExpoAiKitNativeModule =\n requireNativeModule<ExpoAiKitNativeModule>('ExpoAiKit'); \n\nexport default NativeModule;"]}
@@ -0,0 +1,15 @@
1
+ import type { LLMMessage, LLMOptions } from './types';
2
+ export type ExpoAiKitNativeModule = {
3
+ prepareModel(options?: {
4
+ model?: string;
5
+ }): Promise<void>;
6
+ createSession(options?: {
7
+ systemPrompt?: string;
8
+ }): Promise<string>;
9
+ sendMessage(sessionId: string, messages: LLMMessage[], options?: LLMOptions): Promise<{
10
+ reply: string;
11
+ }>;
12
+ };
13
+ declare const NativeModule: ExpoAiKitNativeModule;
14
+ export default NativeModule;
15
+ //# sourceMappingURL=ExpoLlmModule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoLlmModule.d.ts","sourceRoot":"","sources":["../src/ExpoLlmModule.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEtD,MAAM,MAAM,qBAAqB,GAAG;IAClC,YAAY,CAAC,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,aAAa,CAAC,OAAO,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACpE,WAAW,CACT,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,UAAU,EAAE,EACtB,OAAO,CAAC,EAAE,UAAU,GACnB,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC/B,CAAC;AAEF,QAAA,MAAM,YAAY,EAAE,qBACqC,CAAC;AAE1D,eAAe,YAAY,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { requireNativeModule } from 'expo-modules-core';
2
+ const NativeModule = requireNativeModule('ExpoAiKit');
3
+ export default NativeModule;
4
+ //# sourceMappingURL=ExpoLlmModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoLlmModule.js","sourceRoot":"","sources":["../src/ExpoLlmModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAaxD,MAAM,YAAY,GAChB,mBAAmB,CAAwB,WAAW,CAAC,CAAC;AAE1D,eAAe,YAAY,CAAC","sourcesContent":["import { requireNativeModule } from 'expo-modules-core';\nimport type { LLMMessage, LLMOptions } from './types';\n\nexport type ExpoAiKitNativeModule = {\n prepareModel(options?: { model?: string }): Promise<void>;\n createSession(options?: { systemPrompt?: string }): Promise<string>;\n sendMessage(\n sessionId: string,\n messages: LLMMessage[],\n options?: LLMOptions\n ): Promise<{ reply: string }>;\n};\n\nconst NativeModule: ExpoAiKitNativeModule =\n requireNativeModule<ExpoAiKitNativeModule>('ExpoAiKit'); \n\nexport default NativeModule;"]}
@@ -0,0 +1,12 @@
1
+ export * from './types';
2
+ import type { LLMMessage, LLMOptions } from './types';
3
+ export declare function prepareModel(options?: {
4
+ model?: string;
5
+ }): Promise<void>;
6
+ export declare function createSession(options?: {
7
+ systemPrompt?: string;
8
+ }): Promise<string>;
9
+ export declare function sendMessage(sessionId: string, messages: LLMMessage[], options?: LLMOptions): Promise<{
10
+ reply: string;
11
+ }>;
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,SAAS,CAAC;AACxB,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEtD,wBAAsB,YAAY,CAAC,OAAO,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,iBAE9D;AAED,wBAAsB,aAAa,CAAC,OAAO,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,mBAEtE;AAED,wBAAsB,WAAW,CAC/B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,UAAU,EAAE,EACtB,OAAO,CAAC,EAAE,UAAU;;GAGrB"}
package/build/index.js ADDED
@@ -0,0 +1,12 @@
1
+ import NativeModule from './ExpoAiKitModule';
2
+ export * from './types';
3
+ export async function prepareModel(options) {
4
+ return NativeModule.prepareModel(options);
5
+ }
6
+ export async function createSession(options) {
7
+ return NativeModule.createSession(options);
8
+ }
9
+ export async function sendMessage(sessionId, messages, options) {
10
+ return NativeModule.sendMessage(sessionId, messages, options);
11
+ }
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,cAAc,SAAS,CAAC;AAGxB,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,OAA4B;IAC7D,OAAO,YAAY,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,OAAmC;IACrE,OAAO,YAAY,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,SAAiB,EACjB,QAAsB,EACtB,OAAoB;IAEpB,OAAO,YAAY,CAAC,WAAW,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AAChE,CAAC","sourcesContent":["import NativeModule from './ExpoAiKitModule';\nexport * from './types';\nimport type { LLMMessage, LLMOptions } from './types';\n\nexport async function prepareModel(options?: { model?: string }) {\n return NativeModule.prepareModel(options);\n}\n\nexport async function createSession(options?: { systemPrompt?: string }) {\n return NativeModule.createSession(options);\n}\n\nexport async function sendMessage(\n sessionId: string,\n messages: LLMMessage[],\n options?: LLMOptions\n) {\n return NativeModule.sendMessage(sessionId, messages, options);\n}"]}
@@ -0,0 +1,11 @@
1
+ export type LLMRole = 'system' | 'user' | 'assistant';
2
+ export type LLMMessage = {
3
+ role: LLMRole;
4
+ content: string;
5
+ };
6
+ export type LLMOptions = {
7
+ temperature?: number;
8
+ maxTokens?: number;
9
+ model?: string;
10
+ };
11
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAC;AAEtD,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
package/build/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["export type LLMRole = 'system' | 'user' | 'assistant';\n\nexport type LLMMessage = {\n role: LLMRole;\n content: string;\n};\n\nexport type LLMOptions = {\n temperature?: number;\n maxTokens?: number;\n model?: string;\n};"]}
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "expo-ai-kit",
3
+ "version": "0.1.0",
4
+ "description": "Expo AI Kit module",
5
+ "main": "build/index.js",
6
+ "types": "build/index.d.ts",
7
+ "files": ["build"], "scripts": {
8
+ "build": "expo-module build",
9
+ "clean": "expo-module clean",
10
+ "lint": "expo-module lint",
11
+ "test": "expo-module test",
12
+ "prepare": "expo-module prepare",
13
+ "prepublishOnly": "expo-module prepublishOnly",
14
+ "expo-module": "expo-module",
15
+ "open:ios": "xed example/ios",
16
+ "open:android": "open -a \"Android Studio\" example/android",
17
+ "android": "expo run:android",
18
+ "ios": "expo run:ios"
19
+ },
20
+ "keywords": [
21
+ "react-native",
22
+ "expo",
23
+ "expo-ai-kit",
24
+ "ExpoAiKit"
25
+ ],
26
+ "repository": "https://github.com/laraelmas/expo-ai-kit",
27
+ "bugs": {
28
+ "url": "https://github.com/laraelmas/expo-ai-kit/issues"
29
+ },
30
+ "author": "laraelmas <laraaelmas@gmail.com> (https://github.com/laraelmas)",
31
+ "license": "MIT",
32
+ "homepage": "https://github.com/laraelmas/expo-ai-kit#readme",
33
+ "dependencies": {
34
+ "react-native-safe-area-context": "~5.6.0",
35
+ "expo": "~54.0.27",
36
+ "react": "19.1.0",
37
+ "react-native": "0.81.5"
38
+ },
39
+ "devDependencies": {
40
+ "@types/react": "~19.1.0",
41
+ "expo-module-scripts": "^5.0.8",
42
+ "expo": "^54.0.27",
43
+ "react-native": "0.81.5"
44
+ },
45
+ "peerDependencies": {
46
+ "expo": "*",
47
+ "react": "*",
48
+ "react-native": "*"
49
+ }
50
+ }