Releases: shareup/shllm
Releases · shareup/shllm
v0.10.0
v0.9.2
v0.9.1
- Add 4-bit quantization of gpt-oss
Full Changelog: v0.9.0...v0.9.1
v0.9.0
v0.8.1
v0.8.0
v0.7.0
- Add support for GPT-OSS and improve tool calling across all models.
GPT-OSS model tool calling
let chat: [Chat.Message] = [
.system(
"You are a helpful assistant that can provide stock prices. When asked for a stock price, you must use the get_stock_price tool."
),
.user("What is the price of AAPL?"),
]
var input = UserInput(chat: chat)
guard let llm1 = try gptOSS_20B(
input,
tools: [stockTool]
) else { return }
let (_, _, toolCalls) = try await llm1.result
guard let toolCall = toolCalls?.first else {
return
}
input.appendHarmonyAssistantToolCall(toolCall)
input.appendHarmonyToolResult(["price": 123.45])
guard let llm2 = try gptOSS_20B(
input,
tools: [stockTool]
) else { return }
let result = try await llm2.text.resultOther model tool calling
let chat: [Chat.Message] = [
.system(
"You are a helpful assistant that can provide stock prices. When asked for a stock price, you must use the get_stock_price tool."
),
.user("What is the price of AAPL?"),
]
var input = UserInput(chat: chat)
guard let llm1 = try qwen3MoE(
input,
tools: [stockTool]
) else { return }
let (_, _, toolCalls) = try await llm1.result
guard let toolCall = toolCalls?.first else {
return
}
input.appendToolResult(["price": 123.45])
guard let llm2 = try qwen3MoE(
input,
tools: [stockTool]
) else { return }
let result = try await llm2.text.result