expo-local-llm 0.2.1 → 0.2.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.
@@ -23,7 +23,8 @@ enum FoundationModelBridge {
23
23
  }
24
24
  }
25
25
 
26
- static func createSession(instructions: String?, tools: [any Tool] = []) -> LanguageModelSession {
26
+ static func createSession(instructions: String?, dynamicTools: [DynamicTool] = []) -> LanguageModelSession {
27
+ let tools: [any Tool] = dynamicTools
27
28
  if tools.isEmpty {
28
29
  if let instructions {
29
30
  return LanguageModelSession(instructions: instructions)
@@ -113,7 +113,7 @@ class LLMSession: SharedObject {
113
113
  // Cancel any pending tool calls from the old session
114
114
  store.cancelAll()
115
115
 
116
- var tools: [any Tool] = []
116
+ var dynamicTools: [DynamicTool] = []
117
117
  registeredTools.removeAll()
118
118
 
119
119
  for config in toolConfigs {
@@ -138,12 +138,12 @@ class LLMSession: SharedObject {
138
138
  ])
139
139
  }
140
140
  registeredTools[config.name] = tool
141
- tools.append(tool)
141
+ dynamicTools.append(tool)
142
142
  }
143
143
 
144
144
  nativeSession = FoundationModelBridge.createSession(
145
145
  instructions: sessionInstructions,
146
- tools: tools
146
+ dynamicTools: dynamicTools
147
147
  )
148
148
  }
149
149
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-local-llm",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Expo module for on-device LLM inference via Apple Foundation Models (iOS) and Gemini Nano (Android)",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",