Post

Replies

Boosts

Views

Activity

Reply to What is _the_ proper way to intercept tool calls modify them or dynamically approve/reject them?
@Apple Designer, given onToolCall's behavior to propagate any error thrown to the respond/response, one can't utilize it for stopping individual tool calls without ending the current turn's loop entirely. I think that to achieve a fine-grained behavior one still needs to resort to Tool conformance (wrapping or extending existing Tools) to have the tool respond with the non-fatal failure/feedback for the model to continue, right? I may still be missing a handy alternative to do this, and there can be reasons to not want to give it first class support, but filed a suggestion (FB23092325) just in case it is useful.
Topic: Foundation Models SubTopic:
Foundation Models Q&A
19h
Reply to How to obtain more value out of a generic "FoundationModels.LanguageModelError error -1"
This is just trying to find a needle on a haystack, but the device logs don't seem to log anything helpful either to debug. After the "Sending execute streaming request for" the failing requests don't go through much steps and just rapidly see a "Sending InferenceProvider EndOfStream message for" Instead, in any requests that don't ask about the time (e.g. just a "Hello") I see logs for "StringResponseSanitizerRunner", and "Sending execute request". So, not even in the detailed logs I can debug what's up. Would be nice to know more.
2d
Reply to What is _the_ proper way to intercept tool calls modify them or dynamically approve/reject them?
@Apple Designer, given onToolCall's behavior to propagate any error thrown to the respond/response, one can't utilize it for stopping individual tool calls without ending the current turn's loop entirely. I think that to achieve a fine-grained behavior one still needs to resort to Tool conformance (wrapping or extending existing Tools) to have the tool respond with the non-fatal failure/feedback for the model to continue, right? I may still be missing a handy alternative to do this, and there can be reasons to not want to give it first class support, but filed a suggestion (FB23092325) just in case it is useful.
Topic: Foundation Models SubTopic:
Foundation Models Q&A
Replies
Boosts
Views
Activity
19h
Reply to What is _the_ proper way to intercept tool calls modify them or dynamically approve/reject them?
Cannot change the accepted answer once marked 🤦‍♂️… so, while it should be obvious, noting manually that official answer should definitely be the one!
Topic: Foundation Models SubTopic:
Foundation Models Q&A
Replies
Boosts
Views
Activity
1d
Reply to Cannot pattern match LanguageModelError from a response stream
Filed FB23061009 with minimal sample triggering when using the simulator (given this other issue described in https://developer.apple.com/forums/thread/831448 / FB23060822).
Replies
Boosts
Views
Activity
1d
Reply to How to obtain more value out of a generic "FoundationModels.LanguageModelError error -1"
Looking a bit further, the issue seems isolated to the Simulator, hopefully is not less of a priority: FB23060822
Replies
Boosts
Views
Activity
1d
Reply to How to obtain more value out of a generic "FoundationModels.LanguageModelError error -1"
This is just trying to find a needle on a haystack, but the device logs don't seem to log anything helpful either to debug. After the "Sending execute streaming request for" the failing requests don't go through much steps and just rapidly see a "Sending InferenceProvider EndOfStream message for" Instead, in any requests that don't ask about the time (e.g. just a "Hello") I see logs for "StringResponseSanitizerRunner", and "Sending execute request". So, not even in the detailed logs I can debug what's up. Would be nice to know more.
Replies
Boosts
Views
Activity
2d