4 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
3
votes
1
answer
105
views
How can I collect the response of the stream in an object [closed]
I was testing Apple Foundation Models and when trying to use the stream to get the response as it was being displayed I got the answer to print it but for some reason I can store the property of an ...
0
votes
0
answers
57
views
Failing to initialize the SystemLanguageModel with custom adapter
I want to use my custom adapter inside the LanguageModelSession in FoundationModels.
here is my code:
do {
guard let adapterURL = Bundle.main.url(forResource: "my_adapter", ...
1
vote
0
answers
113
views
What is the correct way to get the remaining tokens for a chat session in FoundationModels?
I currently calculate the remaining tokens like this:
var conversationHistorySize: Int {
conversationHistory.components(separatedBy: .whitespacesAndNewlines).count
}
private let maxTokens = 4096
...
1
vote
2
answers
170
views
Cannot find type ToolOutput in scope error for Apple FoundationModels
I watched the latest apple videos about implementing a tool for FoundationModels.
in their code which was the Code 26.0 beta 2, they did use it like this:
func call(arguments: Arguments) async throws -...