Skip to content

Commit af7c8f7

Browse files
committed
Update SDK
update latest generated SDK code from Stainless. This won't build yet (has some errors), patch in later commit. Stainless commit: 7cfdf2e30f04daea33e82236ef2b462e596785ce
1 parent 5189da3 commit af7c8f7

File tree

642 files changed

+56605
-35772
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

642 files changed

+56605
-35772
lines changed

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ or products provided by Llama Stack Client please follow the respective company'
2020

2121
### Llama Stack Client Terms and Policies
2222

23-
Please contact dev-feedback@llama-stack-client.com for any questions or concerns regarding security of our services.
23+
Please contact llamastack@meta.com for any questions or concerns regarding security of our services.
2424

2525
---
2626

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins {
33
}
44

55
allprojects {
6-
group = "com.llama_stack_client.api"
6+
group = "com.llama.llamastack"
77
version = "0.0.1-alpha.0"
88
}
99

buildSrc/src/main/kotlin/llama-stack-client.java.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ configure<SpotlessExtension> {
2121
importOrder()
2222
removeUnusedImports()
2323
palantirJavaFormat()
24+
toggleOffOn()
2425
}
2526
}
2627

buildSrc/src/main/kotlin/llama-stack-client.kotlin.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ kotlin {
1515
configure<SpotlessExtension> {
1616
kotlin {
1717
ktfmt().kotlinlangStyle()
18+
toggleOffOn()
1819
}
1920
}
2021

buildSrc/src/main/kotlin/llama-stack-client.publish.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ configure<PublishingExtension> {
1616

1717
pom {
1818
name.set("[DRAFT] Llama Stack Specification")
19-
description.set("This is the specification of the llama stack that provides a set of endpoints\nand their corresponding interfaces that are tailored to best leverage Llama\nModels. The specification is still in draft and subject to change. Generated at\n2024-09-23 10:56:42.866760")
20-
url.set("https://docs.llama-stack-client.todo")
19+
description.set("This is the specification of the llama stack that provides a set of endpoints\nand their corresponding interfaces that are tailored to best leverage Llama\nModels. The specification is still in draft and subject to change. Generated at\n2024-11-12 11:16:58.657871")
20+
url.set("https://llama-stack.readthedocs.io/en/latest/")
2121

2222
licenses {
2323
license {
@@ -28,7 +28,7 @@ configure<PublishingExtension> {
2828
developers {
2929
developer {
3030
name.set("Llama Stack Client")
31-
email.set("dev-feedback@llama-stack-client.com")
31+
email.set("llamastack@meta.com")
3232
}
3333
}
3434

llama-stack-client-kotlin-client-okhttp/build.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ plugins {
66
dependencies {
77
api(project(":llama-stack-client-kotlin-core"))
88

9-
implementation("com.google.guava:guava:33.0.0-jre")
109
implementation("com.squareup.okhttp3:okhttp:4.12.0")
1110
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0")
1211

1312
testImplementation(kotlin("test"))
1413
testImplementation("org.assertj:assertj-core:3.25.3")
15-
testImplementation("org.slf4j:slf4j-simple:2.0.12")
1614
}
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
// File generated from our OpenAPI spec by Stainless.
2+
3+
package com.llama.llamastack.client.okhttp
4+
5+
import com.fasterxml.jackson.databind.json.JsonMapper
6+
import com.llama.llamastack.client.LlamaStackClientClient
7+
import com.llama.llamastack.client.LlamaStackClientClientImpl
8+
import com.llama.llamastack.core.ClientOptions
9+
import com.llama.llamastack.core.http.Headers
10+
import com.llama.llamastack.core.http.QueryParams
11+
import java.net.Proxy
12+
import java.time.Clock
13+
import java.time.Duration
14+
15+
class LlamaStackClientOkHttpClient private constructor() {
16+
17+
companion object {
18+
19+
fun builder() = Builder()
20+
21+
fun fromEnv(): LlamaStackClientClient = builder().fromEnv().build()
22+
}
23+
24+
class Builder {
25+
26+
private var clientOptions: ClientOptions.Builder = ClientOptions.builder()
27+
private var baseUrl: String = ClientOptions.PRODUCTION_URL
28+
// The default timeout for the client is 1 minute.
29+
private var timeout: Duration = Duration.ofSeconds(60)
30+
private var proxy: Proxy? = null
31+
32+
fun baseUrl(baseUrl: String) = apply {
33+
clientOptions.baseUrl(baseUrl)
34+
this.baseUrl = baseUrl
35+
}
36+
37+
fun jsonMapper(jsonMapper: JsonMapper) = apply { clientOptions.jsonMapper(jsonMapper) }
38+
39+
fun clock(clock: Clock) = apply { clientOptions.clock(clock) }
40+
41+
fun headers(headers: Headers) = apply { clientOptions.headers(headers) }
42+
43+
fun headers(headers: Map<String, Iterable<String>>) = apply {
44+
clientOptions.headers(headers)
45+
}
46+
47+
fun putHeader(name: String, value: String) = apply { clientOptions.putHeader(name, value) }
48+
49+
fun putHeaders(name: String, values: Iterable<String>) = apply {
50+
clientOptions.putHeaders(name, values)
51+
}
52+
53+
fun putAllHeaders(headers: Headers) = apply { clientOptions.putAllHeaders(headers) }
54+
55+
fun putAllHeaders(headers: Map<String, Iterable<String>>) = apply {
56+
clientOptions.putAllHeaders(headers)
57+
}
58+
59+
fun replaceHeaders(name: String, value: String) = apply {
60+
clientOptions.replaceHeaders(name, value)
61+
}
62+
63+
fun replaceHeaders(name: String, values: Iterable<String>) = apply {
64+
clientOptions.replaceHeaders(name, values)
65+
}
66+
67+
fun replaceAllHeaders(headers: Headers) = apply { clientOptions.replaceAllHeaders(headers) }
68+
69+
fun replaceAllHeaders(headers: Map<String, Iterable<String>>) = apply {
70+
clientOptions.replaceAllHeaders(headers)
71+
}
72+
73+
fun removeHeaders(name: String) = apply { clientOptions.removeHeaders(name) }
74+
75+
fun removeAllHeaders(names: Set<String>) = apply { clientOptions.removeAllHeaders(names) }
76+
77+
fun queryParams(queryParams: QueryParams) = apply { clientOptions.queryParams(queryParams) }
78+
79+
fun queryParams(queryParams: Map<String, Iterable<String>>) = apply {
80+
clientOptions.queryParams(queryParams)
81+
}
82+
83+
fun putQueryParam(key: String, value: String) = apply {
84+
clientOptions.putQueryParam(key, value)
85+
}
86+
87+
fun putQueryParams(key: String, values: Iterable<String>) = apply {
88+
clientOptions.putQueryParams(key, values)
89+
}
90+
91+
fun putAllQueryParams(queryParams: QueryParams) = apply {
92+
clientOptions.putAllQueryParams(queryParams)
93+
}
94+
95+
fun putAllQueryParams(queryParams: Map<String, Iterable<String>>) = apply {
96+
clientOptions.putAllQueryParams(queryParams)
97+
}
98+
99+
fun replaceQueryParams(key: String, value: String) = apply {
100+
clientOptions.replaceQueryParams(key, value)
101+
}
102+
103+
fun replaceQueryParams(key: String, values: Iterable<String>) = apply {
104+
clientOptions.replaceQueryParams(key, values)
105+
}
106+
107+
fun replaceAllQueryParams(queryParams: QueryParams) = apply {
108+
clientOptions.replaceAllQueryParams(queryParams)
109+
}
110+
111+
fun replaceAllQueryParams(queryParams: Map<String, Iterable<String>>) = apply {
112+
clientOptions.replaceAllQueryParams(queryParams)
113+
}
114+
115+
fun removeQueryParams(key: String) = apply { clientOptions.removeQueryParams(key) }
116+
117+
fun removeAllQueryParams(keys: Set<String>) = apply {
118+
clientOptions.removeAllQueryParams(keys)
119+
}
120+
121+
fun timeout(timeout: Duration) = apply { this.timeout = timeout }
122+
123+
fun maxRetries(maxRetries: Int) = apply { clientOptions.maxRetries(maxRetries) }
124+
125+
fun proxy(proxy: Proxy) = apply { this.proxy = proxy }
126+
127+
fun responseValidation(responseValidation: Boolean) = apply {
128+
clientOptions.responseValidation(responseValidation)
129+
}
130+
131+
fun fromEnv() = apply { clientOptions.fromEnv() }
132+
133+
fun build(): LlamaStackClientClient =
134+
LlamaStackClientClientImpl(
135+
clientOptions
136+
.httpClient(
137+
OkHttpClient.builder()
138+
.baseUrl(baseUrl)
139+
.timeout(timeout)
140+
.proxy(proxy)
141+
.build()
142+
)
143+
.build()
144+
)
145+
}
146+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
// File generated from our OpenAPI spec by Stainless.
2+
3+
package com.llama.llamastack.client.okhttp
4+
5+
import com.fasterxml.jackson.databind.json.JsonMapper
6+
import com.llama.llamastack.client.LlamaStackClientClientAsync
7+
import com.llama.llamastack.client.LlamaStackClientClientAsyncImpl
8+
import com.llama.llamastack.core.ClientOptions
9+
import com.llama.llamastack.core.http.Headers
10+
import com.llama.llamastack.core.http.QueryParams
11+
import java.net.Proxy
12+
import java.time.Clock
13+
import java.time.Duration
14+
15+
class LlamaStackClientOkHttpClientAsync private constructor() {
16+
17+
companion object {
18+
19+
fun builder() = Builder()
20+
21+
fun fromEnv(): LlamaStackClientClientAsync = builder().fromEnv().build()
22+
}
23+
24+
class Builder {
25+
26+
private var clientOptions: ClientOptions.Builder = ClientOptions.builder()
27+
private var baseUrl: String = ClientOptions.PRODUCTION_URL
28+
// The default timeout for the client is 1 minute.
29+
private var timeout: Duration = Duration.ofSeconds(60)
30+
private var proxy: Proxy? = null
31+
32+
fun baseUrl(baseUrl: String) = apply {
33+
clientOptions.baseUrl(baseUrl)
34+
this.baseUrl = baseUrl
35+
}
36+
37+
fun jsonMapper(jsonMapper: JsonMapper) = apply { clientOptions.jsonMapper(jsonMapper) }
38+
39+
fun clock(clock: Clock) = apply { clientOptions.clock(clock) }
40+
41+
fun headers(headers: Headers) = apply { clientOptions.headers(headers) }
42+
43+
fun headers(headers: Map<String, Iterable<String>>) = apply {
44+
clientOptions.headers(headers)
45+
}
46+
47+
fun putHeader(name: String, value: String) = apply { clientOptions.putHeader(name, value) }
48+
49+
fun putHeaders(name: String, values: Iterable<String>) = apply {
50+
clientOptions.putHeaders(name, values)
51+
}
52+
53+
fun putAllHeaders(headers: Headers) = apply { clientOptions.putAllHeaders(headers) }
54+
55+
fun putAllHeaders(headers: Map<String, Iterable<String>>) = apply {
56+
clientOptions.putAllHeaders(headers)
57+
}
58+
59+
fun replaceHeaders(name: String, value: String) = apply {
60+
clientOptions.replaceHeaders(name, value)
61+
}
62+
63+
fun replaceHeaders(name: String, values: Iterable<String>) = apply {
64+
clientOptions.replaceHeaders(name, values)
65+
}
66+
67+
fun replaceAllHeaders(headers: Headers) = apply { clientOptions.replaceAllHeaders(headers) }
68+
69+
fun replaceAllHeaders(headers: Map<String, Iterable<String>>) = apply {
70+
clientOptions.replaceAllHeaders(headers)
71+
}
72+
73+
fun removeHeaders(name: String) = apply { clientOptions.removeHeaders(name) }
74+
75+
fun removeAllHeaders(names: Set<String>) = apply { clientOptions.removeAllHeaders(names) }
76+
77+
fun queryParams(queryParams: QueryParams) = apply { clientOptions.queryParams(queryParams) }
78+
79+
fun queryParams(queryParams: Map<String, Iterable<String>>) = apply {
80+
clientOptions.queryParams(queryParams)
81+
}
82+
83+
fun putQueryParam(key: String, value: String) = apply {
84+
clientOptions.putQueryParam(key, value)
85+
}
86+
87+
fun putQueryParams(key: String, values: Iterable<String>) = apply {
88+
clientOptions.putQueryParams(key, values)
89+
}
90+
91+
fun putAllQueryParams(queryParams: QueryParams) = apply {
92+
clientOptions.putAllQueryParams(queryParams)
93+
}
94+
95+
fun putAllQueryParams(queryParams: Map<String, Iterable<String>>) = apply {
96+
clientOptions.putAllQueryParams(queryParams)
97+
}
98+
99+
fun replaceQueryParams(key: String, value: String) = apply {
100+
clientOptions.replaceQueryParams(key, value)
101+
}
102+
103+
fun replaceQueryParams(key: String, values: Iterable<String>) = apply {
104+
clientOptions.replaceQueryParams(key, values)
105+
}
106+
107+
fun replaceAllQueryParams(queryParams: QueryParams) = apply {
108+
clientOptions.replaceAllQueryParams(queryParams)
109+
}
110+
111+
fun replaceAllQueryParams(queryParams: Map<String, Iterable<String>>) = apply {
112+
clientOptions.replaceAllQueryParams(queryParams)
113+
}
114+
115+
fun removeQueryParams(key: String) = apply { clientOptions.removeQueryParams(key) }
116+
117+
fun removeAllQueryParams(keys: Set<String>) = apply {
118+
clientOptions.removeAllQueryParams(keys)
119+
}
120+
121+
fun timeout(timeout: Duration) = apply { this.timeout = timeout }
122+
123+
fun maxRetries(maxRetries: Int) = apply { clientOptions.maxRetries(maxRetries) }
124+
125+
fun proxy(proxy: Proxy) = apply { this.proxy = proxy }
126+
127+
fun responseValidation(responseValidation: Boolean) = apply {
128+
clientOptions.responseValidation(responseValidation)
129+
}
130+
131+
fun fromEnv() = apply { clientOptions.fromEnv() }
132+
133+
fun build(): LlamaStackClientClientAsync =
134+
LlamaStackClientClientAsyncImpl(
135+
clientOptions
136+
.httpClient(
137+
OkHttpClient.builder()
138+
.baseUrl(baseUrl)
139+
.timeout(timeout)
140+
.proxy(proxy)
141+
.build()
142+
)
143+
.build()
144+
)
145+
}
146+
}

0 commit comments

Comments
 (0)