Skip to content

Commit d5b6b8d

Browse files
committed
update APIs for 0.0.58
1 parent 68472ee commit d5b6b8d

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Sources/LlamaStackClient/Agents/ChatAgent.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class ChatAgent {
127127
for try await chunk in try await inferenceApi.chatCompletion(
128128
request: Components.Schemas.ChatCompletionRequest(
129129
messages: inputMessages,
130-
model: agentConfig.model,
130+
model_id: agentConfig.model,
131131
stream: true,
132132
tools: agentConfig.toolDefinitions
133133
)

Sources/LlamaStackClient/Agents/RemoteAgents.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,21 @@ public class RemoteAgents: Agents {
5252
}
5353

5454
public func create(request: Components.Schemas.CreateAgentRequest) async throws -> Components.Schemas.AgentCreateResponse {
55-
let response = try await client.post_sol_agents_sol_create(body: Operations.post_sol_agents_sol_create.Input.Body.json(request))
55+
let response = try await client.post_sol_alpha_sol_agents_sol_create(body: Operations.post_sol_alpha_sol_agents_sol_create.Input.Body.json(request))
5656
return try response.ok.body.json
5757
}
5858

5959
public func createSession(request: Components.Schemas.CreateAgentSessionRequest) async throws -> Components.Schemas.AgentSessionCreateResponse {
60-
let response = try await client.post_sol_agents_sol_session_sol_create(body: Operations.post_sol_agents_sol_session_sol_create.Input.Body.json(request))
60+
let response = try await client.post_sol_alpha_sol_agents_sol_session_sol_create(body: Operations.post_sol_alpha_sol_agents_sol_session_sol_create.Input.Body.json(request))
6161
return try response.ok.body.json
6262
}
6363

6464
public func createTurn(request: Components.Schemas.CreateAgentTurnRequest) async throws -> AsyncStream<Components.Schemas.AgentTurnResponseStreamChunk> {
6565
return AsyncStream<Components.Schemas.AgentTurnResponseStreamChunk> { continuation in
6666
Task {
6767
do {
68-
let response = try await self.client.post_sol_agents_sol_turn_sol_create(
69-
body: Operations.post_sol_agents_sol_turn_sol_create.Input.Body.json(request)
68+
let response = try await self.client.post_sol_alpha_sol_agents_sol_turn_sol_create(
69+
body: Operations.post_sol_alpha_sol_agents_sol_turn_sol_create.Input.Body.json(request)
7070
)
7171
let stream = try response.ok.body.text_event_hyphen_stream.asDecodedServerSentEventsWithJSONData(
7272
of: Components.Schemas.AgentTurnResponseStreamChunk.self

Sources/LlamaStackClient/Inference/RemoteInference.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ public class RemoteInference: Inference {
1818
return AsyncStream<Components.Schemas.ChatCompletionResponseStreamChunk> { continuation in
1919
Task {
2020
do {
21-
let response = try await self.client.post_sol_inference_sol_chat_completion(
22-
body: Operations.post_sol_inference_sol_chat_completion.Input.Body.json(request)
21+
let response = try await self.client.post_sol_alpha_sol_inference_sol_chat_hyphen_completion(
22+
body: Operations.post_sol_alpha_sol_inference_sol_chat_hyphen_completion.Input.Body.json(request)
2323
)
2424
let stream = try response.ok.body.text_event_hyphen_stream.asDecodedServerSentEventsWithJSONData(
2525
of: Components.Schemas.ChatCompletionResponseStreamChunk.self

0 commit comments

Comments
 (0)