@umituz/react-native-ai-gemini-provider 2.0.7 → 2.0.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-ai-gemini-provider",
3
- "version": "2.0.7",
3
+ "version": "2.0.9",
4
4
  "description": "Google Gemini AI text generation provider for React Native applications",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -32,7 +32,7 @@ export class GeminiProvider {
32
32
  /**
33
33
  * Generate text from prompt
34
34
  */
35
- async generateText(prompt: string, model?: string): Promise<string> {
35
+ async generateText(prompt: string, model: string): Promise<string> {
36
36
  return generationExecutor.executeTextGeneration(prompt, model);
37
37
  }
38
38
 
@@ -43,10 +43,10 @@ export class GeminiProvider {
43
43
  async generateTextWithImages(
44
44
  prompt: string,
45
45
  images: GeminiImageInput[],
46
- model?: string,
46
+ model: string,
47
47
  ): Promise<string> {
48
48
  const result = await generationExecutor.generateWithImages(
49
- model ?? "gemini-2.0-flash",
49
+ model,
50
50
  prompt,
51
51
  images,
52
52
  );
@@ -59,7 +59,7 @@ export class GeminiProvider {
59
59
  async generateStructuredText<T>(
60
60
  prompt: string,
61
61
  schema: Record<string, unknown>,
62
- model?: string,
62
+ model: string,
63
63
  ): Promise<T> {
64
64
  return generationExecutor.executeStructuredGeneration<T>(prompt, schema, model);
65
65
  }
@@ -25,13 +25,13 @@ export class GenerationExecutor {
25
25
  /**
26
26
  * Execute text generation
27
27
  */
28
- async executeTextGeneration(prompt: string, model?: string): Promise<string> {
28
+ async executeTextGeneration(prompt: string, model: string): Promise<string> {
29
29
  if (typeof __DEV__ !== "undefined" && __DEV__) {
30
30
  console.log("[GenerationExecutor] executeTextGeneration() called", { model });
31
31
  }
32
32
 
33
33
  const response = await geminiTextGenerationService.generateContent(
34
- model ?? "gemini-2.0-flash",
34
+ model,
35
35
  [{ parts: [{ text: prompt }], role: "user" }],
36
36
  );
37
37
 
@@ -44,14 +44,14 @@ export class GenerationExecutor {
44
44
  async executeStructuredGeneration<T>(
45
45
  prompt: string,
46
46
  schema: Record<string, unknown>,
47
- model?: string,
47
+ model: string,
48
48
  ): Promise<T> {
49
49
  if (typeof __DEV__ !== "undefined" && __DEV__) {
50
50
  console.log("[GenerationExecutor] executeStructuredGeneration() called", { model });
51
51
  }
52
52
 
53
53
  return geminiStructuredTextService.generateStructuredText<T>(
54
- model ?? "gemini-2.0-flash",
54
+ model,
55
55
  prompt,
56
56
  schema,
57
57
  );