@umituz/react-native-ai-groq-provider 1.0.9 → 1.0.11

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-groq-provider",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "Groq text generation provider for React Native applications",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./dist/index.d.ts",
@@ -104,7 +104,7 @@ class ChatSessionService {
104
104
  async send(
105
105
  sessionId: string,
106
106
  content: string,
107
- options: SendChatMessageOptions = {}
107
+ _options: SendChatMessageOptions = {}
108
108
  ): Promise<ChatSendResult> {
109
109
  const session = this.sessions.get(sessionId);
110
110
  if (!session) {
@@ -5,7 +5,6 @@
5
5
 
6
6
  import type {
7
7
  GroqChatRequest,
8
- GroqChatResponse,
9
8
  GroqMessage,
10
9
  GroqGenerationConfig,
11
10
  } from "../../domain/entities";
@@ -4,10 +4,8 @@
4
4
  */
5
5
 
6
6
  import { useState, useCallback, useRef } from "react";
7
- import type { GroqGenerationConfig, GroqChatConfig } from "../../domain/entities";
8
- import { groqHttpClient } from "../../infrastructure/services/GroqClient";
9
- import { chatSessionService } from "../../infrastructure/services/ChatSession";
10
- import { textGeneration, chatGeneration } from "../../infrastructure/services/TextGeneration";
7
+ import type { GroqGenerationConfig } from "../../domain/entities";
8
+ import { textGeneration } from "../../infrastructure/services/TextGeneration";
11
9
  import { structuredText } from "../../infrastructure/services/StructuredText";
12
10
  import { streaming } from "../../infrastructure/services/Streaming";
13
11
  import { getUserFriendlyError } from "../../infrastructure/utils/error-mapper.util";
@@ -167,7 +165,7 @@ export function useGroq(options: UseGroqOptions = {}): UseGroqReturn {
167
165
  options.onStart?.();
168
166
 
169
167
  try {
170
- for await (const chunk of streaming(prompt, {
168
+ for await (const streamingResult of streaming(prompt, {
171
169
  model: options.model,
172
170
  generationConfig: { ...options.generationConfig, ...config },
173
171
  callbacks: {
@@ -177,7 +175,8 @@ export function useGroq(options: UseGroqOptions = {}): UseGroqReturn {
177
175
  },
178
176
  },
179
177
  })) {
180
- // Streamed via callback
178
+ // Consume the async iterator (streaming is handled via callbacks)
179
+ void streamingResult;
181
180
  }
182
181
 
183
182
  setResult(fullContent);
@@ -3,7 +3,6 @@
3
3
  * Factory for creating configured Groq provider instances
4
4
  */
5
5
 
6
- import type { GroqConfig, GroqGenerationConfig } from "../domain/entities";
7
6
  import { groqHttpClient } from "../infrastructure/services/GroqClient";
8
7
  import { ConfigBuilder, GenerationConfigBuilder } from "./ConfigBuilder";
9
8