liter_llm 1.4.0.pre.rc.57 → 1.4.0.pre.rc.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/liter_llm_rb/native/Cargo.lock +7 -7
- data/ext/liter_llm_rb/native/Cargo.toml +3 -3
- data/ext/liter_llm_rb/src/lib.rs +148 -141
- data/lib/liter_llm/native.rb +1 -1
- data/lib/liter_llm/version.rb +2 -2
- data/lib/liter_llm.rb +1 -1
- data/sig/types.rbs +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3d55f48c54c0c4f9eaa0ca4e27e442fcbf97ad7a2c48062bec2bd0309dfa0238
|
|
4
|
+
data.tar.gz: 82f56cf938221dee16f9a9a0b8c999cde56417674b784c313c2dfbe682d0e784
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 444cfa14bc02245875f453de4bbb15fe18c6e85457d971ca124a19b0f258bbfe33b2d1bd1b9151a96244683be259b899c432f93832253a2eea8f2f4afb4b467c
|
|
7
|
+
data.tar.gz: 343802fdf1f9d00a25663a553046947a8db9a39ca067f0b07c0d651428c2159706351bf16df7aef90a199d4f39f53e0f87648e74064adfc60d284f004dc06683
|
|
@@ -412,9 +412,9 @@ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
|
|
412
412
|
|
|
413
413
|
[[package]]
|
|
414
414
|
name = "chrono"
|
|
415
|
-
version = "0.4.
|
|
415
|
+
version = "0.4.45"
|
|
416
416
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
417
|
-
checksum = "
|
|
417
|
+
checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327"
|
|
418
418
|
dependencies = [
|
|
419
419
|
"iana-time-zone",
|
|
420
420
|
"js-sys",
|
|
@@ -1768,9 +1768,9 @@ checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0"
|
|
|
1768
1768
|
|
|
1769
1769
|
[[package]]
|
|
1770
1770
|
name = "liter-llm"
|
|
1771
|
-
version = "1.4.0-rc.
|
|
1771
|
+
version = "1.4.0-rc.59"
|
|
1772
1772
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1773
|
-
checksum = "
|
|
1773
|
+
checksum = "cb5928dea7aef1d0e90e55c1f3f0b7f8cebc2eb6c15bc3da7099eacd9443c1e1"
|
|
1774
1774
|
dependencies = [
|
|
1775
1775
|
"aws-credential-types",
|
|
1776
1776
|
"aws-sigv4",
|
|
@@ -1802,7 +1802,7 @@ dependencies = [
|
|
|
1802
1802
|
|
|
1803
1803
|
[[package]]
|
|
1804
1804
|
name = "liter-llm-rb"
|
|
1805
|
-
version = "1.4.0-rc.
|
|
1805
|
+
version = "1.4.0-rc.59"
|
|
1806
1806
|
dependencies = [
|
|
1807
1807
|
"futures",
|
|
1808
1808
|
"liter-llm",
|
|
@@ -1824,9 +1824,9 @@ dependencies = [
|
|
|
1824
1824
|
|
|
1825
1825
|
[[package]]
|
|
1826
1826
|
name = "log"
|
|
1827
|
-
version = "0.4.
|
|
1827
|
+
version = "0.4.32"
|
|
1828
1828
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1829
|
-
checksum = "
|
|
1829
|
+
checksum = "953f07c43838f8e6f9758cab68bf5bed85465e7587ebe0b823f1bcd81978ad3a"
|
|
1830
1830
|
|
|
1831
1831
|
[[package]]
|
|
1832
1832
|
name = "macro_rules_attribute"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "liter-llm-rb"
|
|
3
|
-
version = "1.4.0-rc.
|
|
3
|
+
version = "1.4.0-rc.59"
|
|
4
4
|
edition = "2024"
|
|
5
5
|
license = "MIT"
|
|
6
6
|
description = "Universal LLM API client with Rust-powered polyglot bindings."
|
|
@@ -9,7 +9,7 @@ keywords = ["anthropic", "api-client", "llm", "openai"]
|
|
|
9
9
|
categories = ["text-processing"]
|
|
10
10
|
|
|
11
11
|
[package.metadata.cargo-machete]
|
|
12
|
-
ignored = ["
|
|
12
|
+
ignored = ["rb-sys"]
|
|
13
13
|
|
|
14
14
|
[lib]
|
|
15
15
|
name = "liter_llm_rb"
|
|
@@ -18,7 +18,7 @@ crate-type = ["cdylib"]
|
|
|
18
18
|
|
|
19
19
|
[dependencies]
|
|
20
20
|
futures = "0.3"
|
|
21
|
-
liter-llm = { version = "1.4.0-rc.
|
|
21
|
+
liter-llm = { version = "1.4.0-rc.59", features = ["native-http", "full"] }
|
|
22
22
|
magnus = "0.8"
|
|
23
23
|
rb-sys = ">=0.9, <0.9.128"
|
|
24
24
|
serde = { version = "1", features = ["derive"] }
|
data/ext/liter_llm_rb/src/lib.rs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is auto-generated by alef. DO NOT EDIT.
|
|
2
|
-
// alef:hash:
|
|
2
|
+
// alef:hash:2056fea64bf6b2c8a4850aaade9cf52a7d3d9ba731594e4cc276f6f5dc460e32
|
|
3
3
|
// Re-generate with: alef generate
|
|
4
4
|
#![allow(dead_code, unused_imports, unused_variables)]
|
|
5
5
|
#![allow(
|
|
@@ -8423,8 +8423,8 @@ impl From<SystemMessage> for liter_llm::types::SystemMessage {
|
|
|
8423
8423
|
impl From<liter_llm::types::SystemMessage> for SystemMessage {
|
|
8424
8424
|
fn from(val: liter_llm::types::SystemMessage) -> Self {
|
|
8425
8425
|
Self {
|
|
8426
|
-
content: val.content,
|
|
8427
|
-
name: val.name,
|
|
8426
|
+
content: val.content.to_string(),
|
|
8427
|
+
name: val.name.map(|v| v.to_string()),
|
|
8428
8428
|
}
|
|
8429
8429
|
}
|
|
8430
8430
|
}
|
|
@@ -8444,7 +8444,7 @@ impl From<liter_llm::types::UserMessage> for UserMessage {
|
|
|
8444
8444
|
fn from(val: liter_llm::types::UserMessage) -> Self {
|
|
8445
8445
|
Self {
|
|
8446
8446
|
content: val.content.into(),
|
|
8447
|
-
name: val.name,
|
|
8447
|
+
name: val.name.map(|v| v.to_string()),
|
|
8448
8448
|
}
|
|
8449
8449
|
}
|
|
8450
8450
|
}
|
|
@@ -8463,7 +8463,7 @@ impl From<ImageUrl> for liter_llm::types::ImageUrl {
|
|
|
8463
8463
|
impl From<liter_llm::types::ImageUrl> for ImageUrl {
|
|
8464
8464
|
fn from(val: liter_llm::types::ImageUrl) -> Self {
|
|
8465
8465
|
Self {
|
|
8466
|
-
url: val.url,
|
|
8466
|
+
url: val.url.to_string(),
|
|
8467
8467
|
detail: val.detail.map(Into::into),
|
|
8468
8468
|
}
|
|
8469
8469
|
}
|
|
@@ -8483,8 +8483,8 @@ impl From<DocumentContent> for liter_llm::types::DocumentContent {
|
|
|
8483
8483
|
impl From<liter_llm::types::DocumentContent> for DocumentContent {
|
|
8484
8484
|
fn from(val: liter_llm::types::DocumentContent) -> Self {
|
|
8485
8485
|
Self {
|
|
8486
|
-
data: val.data,
|
|
8487
|
-
media_type: val.media_type,
|
|
8486
|
+
data: val.data.to_string(),
|
|
8487
|
+
media_type: val.media_type.to_string(),
|
|
8488
8488
|
}
|
|
8489
8489
|
}
|
|
8490
8490
|
}
|
|
@@ -8503,8 +8503,8 @@ impl From<AudioContent> for liter_llm::types::AudioContent {
|
|
|
8503
8503
|
impl From<liter_llm::types::AudioContent> for AudioContent {
|
|
8504
8504
|
fn from(val: liter_llm::types::AudioContent) -> Self {
|
|
8505
8505
|
Self {
|
|
8506
|
-
data: val.data,
|
|
8507
|
-
format: val.format,
|
|
8506
|
+
data: val.data.to_string(),
|
|
8507
|
+
format: val.format.to_string(),
|
|
8508
8508
|
}
|
|
8509
8509
|
}
|
|
8510
8510
|
}
|
|
@@ -8526,10 +8526,10 @@ impl From<AssistantMessage> for liter_llm::types::AssistantMessage {
|
|
|
8526
8526
|
impl From<liter_llm::types::AssistantMessage> for AssistantMessage {
|
|
8527
8527
|
fn from(val: liter_llm::types::AssistantMessage) -> Self {
|
|
8528
8528
|
Self {
|
|
8529
|
-
content: val.content,
|
|
8530
|
-
name: val.name,
|
|
8529
|
+
content: val.content.map(|v| v.to_string()),
|
|
8530
|
+
name: val.name.map(|v| v.to_string()),
|
|
8531
8531
|
tool_calls: val.tool_calls.map(|v| v.into_iter().map(Into::into).collect()),
|
|
8532
|
-
refusal: val.refusal,
|
|
8532
|
+
refusal: val.refusal.map(|v| v.to_string()),
|
|
8533
8533
|
function_call: val.function_call.map(Into::into),
|
|
8534
8534
|
}
|
|
8535
8535
|
}
|
|
@@ -8550,9 +8550,9 @@ impl From<ToolMessage> for liter_llm::types::ToolMessage {
|
|
|
8550
8550
|
impl From<liter_llm::types::ToolMessage> for ToolMessage {
|
|
8551
8551
|
fn from(val: liter_llm::types::ToolMessage) -> Self {
|
|
8552
8552
|
Self {
|
|
8553
|
-
content: val.content,
|
|
8554
|
-
tool_call_id: val.tool_call_id,
|
|
8555
|
-
name: val.name,
|
|
8553
|
+
content: val.content.to_string(),
|
|
8554
|
+
tool_call_id: val.tool_call_id.to_string(),
|
|
8555
|
+
name: val.name.map(|v| v.to_string()),
|
|
8556
8556
|
}
|
|
8557
8557
|
}
|
|
8558
8558
|
}
|
|
@@ -8571,8 +8571,8 @@ impl From<DeveloperMessage> for liter_llm::types::DeveloperMessage {
|
|
|
8571
8571
|
impl From<liter_llm::types::DeveloperMessage> for DeveloperMessage {
|
|
8572
8572
|
fn from(val: liter_llm::types::DeveloperMessage) -> Self {
|
|
8573
8573
|
Self {
|
|
8574
|
-
content: val.content,
|
|
8575
|
-
name: val.name,
|
|
8574
|
+
content: val.content.to_string(),
|
|
8575
|
+
name: val.name.map(|v| v.to_string()),
|
|
8576
8576
|
}
|
|
8577
8577
|
}
|
|
8578
8578
|
}
|
|
@@ -8591,8 +8591,8 @@ impl From<FunctionMessage> for liter_llm::types::FunctionMessage {
|
|
|
8591
8591
|
impl From<liter_llm::types::FunctionMessage> for FunctionMessage {
|
|
8592
8592
|
fn from(val: liter_llm::types::FunctionMessage) -> Self {
|
|
8593
8593
|
Self {
|
|
8594
|
-
content: val.content,
|
|
8595
|
-
name: val.name,
|
|
8594
|
+
content: val.content.to_string(),
|
|
8595
|
+
name: val.name.to_string(),
|
|
8596
8596
|
}
|
|
8597
8597
|
}
|
|
8598
8598
|
}
|
|
@@ -8633,8 +8633,8 @@ impl From<FunctionDefinition> for liter_llm::types::FunctionDefinition {
|
|
|
8633
8633
|
impl From<liter_llm::types::FunctionDefinition> for FunctionDefinition {
|
|
8634
8634
|
fn from(val: liter_llm::types::FunctionDefinition) -> Self {
|
|
8635
8635
|
Self {
|
|
8636
|
-
name: val.name,
|
|
8637
|
-
description: val.description,
|
|
8636
|
+
name: val.name.to_string(),
|
|
8637
|
+
description: val.description.map(|v| v.to_string()),
|
|
8638
8638
|
parameters: val.parameters.as_ref().map(ToString::to_string),
|
|
8639
8639
|
strict: val.strict,
|
|
8640
8640
|
}
|
|
@@ -8656,7 +8656,7 @@ impl From<ToolCall> for liter_llm::types::ToolCall {
|
|
|
8656
8656
|
impl From<liter_llm::types::ToolCall> for ToolCall {
|
|
8657
8657
|
fn from(val: liter_llm::types::ToolCall) -> Self {
|
|
8658
8658
|
Self {
|
|
8659
|
-
id: val.id,
|
|
8659
|
+
id: val.id.to_string(),
|
|
8660
8660
|
call_type: val.call_type.into(),
|
|
8661
8661
|
function: val.function.into(),
|
|
8662
8662
|
}
|
|
@@ -8677,8 +8677,8 @@ impl From<FunctionCall> for liter_llm::types::FunctionCall {
|
|
|
8677
8677
|
impl From<liter_llm::types::FunctionCall> for FunctionCall {
|
|
8678
8678
|
fn from(val: liter_llm::types::FunctionCall) -> Self {
|
|
8679
8679
|
Self {
|
|
8680
|
-
name: val.name,
|
|
8681
|
-
arguments: val.arguments,
|
|
8680
|
+
name: val.name.to_string(),
|
|
8681
|
+
arguments: val.arguments.to_string(),
|
|
8682
8682
|
}
|
|
8683
8683
|
}
|
|
8684
8684
|
}
|
|
@@ -8713,7 +8713,9 @@ impl From<SpecificFunction> for liter_llm::types::SpecificFunction {
|
|
|
8713
8713
|
#[allow(clippy::redundant_closure, clippy::useless_conversion)]
|
|
8714
8714
|
impl From<liter_llm::types::SpecificFunction> for SpecificFunction {
|
|
8715
8715
|
fn from(val: liter_llm::types::SpecificFunction) -> Self {
|
|
8716
|
-
Self {
|
|
8716
|
+
Self {
|
|
8717
|
+
name: val.name.to_string(),
|
|
8718
|
+
}
|
|
8717
8719
|
}
|
|
8718
8720
|
}
|
|
8719
8721
|
|
|
@@ -8733,8 +8735,8 @@ impl From<JsonSchemaFormat> for liter_llm::types::JsonSchemaFormat {
|
|
|
8733
8735
|
impl From<liter_llm::types::JsonSchemaFormat> for JsonSchemaFormat {
|
|
8734
8736
|
fn from(val: liter_llm::types::JsonSchemaFormat) -> Self {
|
|
8735
8737
|
Self {
|
|
8736
|
-
name: val.name,
|
|
8737
|
-
description: val.description,
|
|
8738
|
+
name: val.name.to_string(),
|
|
8739
|
+
description: val.description.map(|v| v.to_string()),
|
|
8738
8740
|
schema: val.schema.to_string(),
|
|
8739
8741
|
strict: val.strict,
|
|
8740
8742
|
}
|
|
@@ -8817,7 +8819,7 @@ impl From<ChatCompletionRequest> for liter_llm::types::ChatCompletionRequest {
|
|
|
8817
8819
|
impl From<liter_llm::types::ChatCompletionRequest> for ChatCompletionRequest {
|
|
8818
8820
|
fn from(val: liter_llm::types::ChatCompletionRequest) -> Self {
|
|
8819
8821
|
Self {
|
|
8820
|
-
model: val.model,
|
|
8822
|
+
model: val.model.to_string(),
|
|
8821
8823
|
messages: val.messages.into_iter().map(Into::into).collect(),
|
|
8822
8824
|
temperature: val.temperature,
|
|
8823
8825
|
top_p: val.top_p,
|
|
@@ -8828,7 +8830,7 @@ impl From<liter_llm::types::ChatCompletionRequest> for ChatCompletionRequest {
|
|
|
8828
8830
|
presence_penalty: val.presence_penalty,
|
|
8829
8831
|
frequency_penalty: val.frequency_penalty,
|
|
8830
8832
|
logit_bias: val.logit_bias.map(|m| m.into_iter().collect()),
|
|
8831
|
-
user: val.user,
|
|
8833
|
+
user: val.user.map(|v| v.to_string()),
|
|
8832
8834
|
tools: val.tools.map(|v| v.into_iter().map(Into::into).collect()),
|
|
8833
8835
|
tool_choice: val.tool_choice.map(Into::into),
|
|
8834
8836
|
parallel_tool_calls: val.parallel_tool_calls,
|
|
@@ -8879,14 +8881,14 @@ impl From<ChatCompletionResponse> for liter_llm::types::ChatCompletionResponse {
|
|
|
8879
8881
|
impl From<liter_llm::types::ChatCompletionResponse> for ChatCompletionResponse {
|
|
8880
8882
|
fn from(val: liter_llm::types::ChatCompletionResponse) -> Self {
|
|
8881
8883
|
Self {
|
|
8882
|
-
id: val.id,
|
|
8883
|
-
object: val.object,
|
|
8884
|
+
id: val.id.to_string(),
|
|
8885
|
+
object: val.object.to_string(),
|
|
8884
8886
|
created: val.created,
|
|
8885
|
-
model: val.model,
|
|
8887
|
+
model: val.model.to_string(),
|
|
8886
8888
|
choices: val.choices.into_iter().map(Into::into).collect(),
|
|
8887
8889
|
usage: val.usage.map(Into::into),
|
|
8888
|
-
system_fingerprint: val.system_fingerprint,
|
|
8889
|
-
service_tier: val.service_tier,
|
|
8890
|
+
system_fingerprint: val.system_fingerprint.map(|v| v.to_string()),
|
|
8891
|
+
service_tier: val.service_tier.map(|v| v.to_string()),
|
|
8890
8892
|
}
|
|
8891
8893
|
}
|
|
8892
8894
|
}
|
|
@@ -8917,14 +8919,14 @@ impl From<liter_llm::types::Choice> for Choice {
|
|
|
8917
8919
|
impl From<liter_llm::types::ChatCompletionChunk> for ChatCompletionChunk {
|
|
8918
8920
|
fn from(val: liter_llm::types::ChatCompletionChunk) -> Self {
|
|
8919
8921
|
Self {
|
|
8920
|
-
id: val.id,
|
|
8921
|
-
object: val.object,
|
|
8922
|
+
id: val.id.to_string(),
|
|
8923
|
+
object: val.object.to_string(),
|
|
8922
8924
|
created: val.created,
|
|
8923
|
-
model: val.model,
|
|
8925
|
+
model: val.model.to_string(),
|
|
8924
8926
|
choices: val.choices.into_iter().map(Into::into).collect(),
|
|
8925
8927
|
usage: val.usage.map(Into::into),
|
|
8926
|
-
system_fingerprint: val.system_fingerprint,
|
|
8927
|
-
service_tier: val.service_tier,
|
|
8928
|
+
system_fingerprint: val.system_fingerprint.map(|v| v.to_string()),
|
|
8929
|
+
service_tier: val.service_tier.map(|v| v.to_string()),
|
|
8928
8930
|
}
|
|
8929
8931
|
}
|
|
8930
8932
|
}
|
|
@@ -8944,11 +8946,11 @@ impl From<liter_llm::types::StreamChoice> for StreamChoice {
|
|
|
8944
8946
|
impl From<liter_llm::types::StreamDelta> for StreamDelta {
|
|
8945
8947
|
fn from(val: liter_llm::types::StreamDelta) -> Self {
|
|
8946
8948
|
Self {
|
|
8947
|
-
role: val.role,
|
|
8948
|
-
content: val.content,
|
|
8949
|
+
role: val.role.map(|v| v.to_string()),
|
|
8950
|
+
content: val.content.map(|v| v.to_string()),
|
|
8949
8951
|
tool_calls: val.tool_calls.map(|v| v.into_iter().map(Into::into).collect()),
|
|
8950
8952
|
function_call: val.function_call.map(Into::into),
|
|
8951
|
-
refusal: val.refusal,
|
|
8953
|
+
refusal: val.refusal.map(|v| v.to_string()),
|
|
8952
8954
|
}
|
|
8953
8955
|
}
|
|
8954
8956
|
}
|
|
@@ -8958,7 +8960,7 @@ impl From<liter_llm::types::StreamToolCall> for StreamToolCall {
|
|
|
8958
8960
|
fn from(val: liter_llm::types::StreamToolCall) -> Self {
|
|
8959
8961
|
Self {
|
|
8960
8962
|
index: val.index,
|
|
8961
|
-
id: val.id,
|
|
8963
|
+
id: val.id.map(|v| v.to_string()),
|
|
8962
8964
|
call_type: val.call_type.map(Into::into),
|
|
8963
8965
|
function: val.function.map(Into::into),
|
|
8964
8966
|
}
|
|
@@ -8969,8 +8971,8 @@ impl From<liter_llm::types::StreamToolCall> for StreamToolCall {
|
|
|
8969
8971
|
impl From<liter_llm::types::StreamFunctionCall> for StreamFunctionCall {
|
|
8970
8972
|
fn from(val: liter_llm::types::StreamFunctionCall) -> Self {
|
|
8971
8973
|
Self {
|
|
8972
|
-
name: val.name,
|
|
8973
|
-
arguments: val.arguments,
|
|
8974
|
+
name: val.name.map(|v| v.to_string()),
|
|
8975
|
+
arguments: val.arguments.map(|v| v.to_string()),
|
|
8974
8976
|
}
|
|
8975
8977
|
}
|
|
8976
8978
|
}
|
|
@@ -8992,11 +8994,11 @@ impl From<EmbeddingRequest> for liter_llm::types::EmbeddingRequest {
|
|
|
8992
8994
|
impl From<liter_llm::types::EmbeddingRequest> for EmbeddingRequest {
|
|
8993
8995
|
fn from(val: liter_llm::types::EmbeddingRequest) -> Self {
|
|
8994
8996
|
Self {
|
|
8995
|
-
model: val.model,
|
|
8997
|
+
model: val.model.to_string(),
|
|
8996
8998
|
input: val.input.into(),
|
|
8997
8999
|
encoding_format: val.encoding_format.map(Into::into),
|
|
8998
9000
|
dimensions: val.dimensions,
|
|
8999
|
-
user: val.user,
|
|
9001
|
+
user: val.user.map(|v| v.to_string()),
|
|
9000
9002
|
}
|
|
9001
9003
|
}
|
|
9002
9004
|
}
|
|
@@ -9017,9 +9019,9 @@ impl From<EmbeddingResponse> for liter_llm::types::EmbeddingResponse {
|
|
|
9017
9019
|
impl From<liter_llm::types::EmbeddingResponse> for EmbeddingResponse {
|
|
9018
9020
|
fn from(val: liter_llm::types::EmbeddingResponse) -> Self {
|
|
9019
9021
|
Self {
|
|
9020
|
-
object: val.object,
|
|
9022
|
+
object: val.object.to_string(),
|
|
9021
9023
|
data: val.data.into_iter().map(Into::into).collect(),
|
|
9022
|
-
model: val.model,
|
|
9024
|
+
model: val.model.to_string(),
|
|
9023
9025
|
usage: val.usage.map(Into::into),
|
|
9024
9026
|
}
|
|
9025
9027
|
}
|
|
@@ -9040,7 +9042,7 @@ impl From<EmbeddingObject> for liter_llm::types::EmbeddingObject {
|
|
|
9040
9042
|
impl From<liter_llm::types::EmbeddingObject> for EmbeddingObject {
|
|
9041
9043
|
fn from(val: liter_llm::types::EmbeddingObject) -> Self {
|
|
9042
9044
|
Self {
|
|
9043
|
-
object: val.object,
|
|
9045
|
+
object: val.object.to_string(),
|
|
9044
9046
|
embedding: val.embedding.into_iter().collect(),
|
|
9045
9047
|
index: val.index,
|
|
9046
9048
|
}
|
|
@@ -9067,14 +9069,14 @@ impl From<CreateImageRequest> for liter_llm::types::CreateImageRequest {
|
|
|
9067
9069
|
impl From<liter_llm::types::CreateImageRequest> for CreateImageRequest {
|
|
9068
9070
|
fn from(val: liter_llm::types::CreateImageRequest) -> Self {
|
|
9069
9071
|
Self {
|
|
9070
|
-
prompt: val.prompt,
|
|
9071
|
-
model: val.model,
|
|
9072
|
+
prompt: val.prompt.to_string(),
|
|
9073
|
+
model: val.model.map(|v| v.to_string()),
|
|
9072
9074
|
n: val.n,
|
|
9073
|
-
size: val.size,
|
|
9074
|
-
quality: val.quality,
|
|
9075
|
-
style: val.style,
|
|
9076
|
-
response_format: val.response_format,
|
|
9077
|
-
user: val.user,
|
|
9075
|
+
size: val.size.map(|v| v.to_string()),
|
|
9076
|
+
quality: val.quality.map(|v| v.to_string()),
|
|
9077
|
+
style: val.style.map(|v| v.to_string()),
|
|
9078
|
+
response_format: val.response_format.map(|v| v.to_string()),
|
|
9079
|
+
user: val.user.map(|v| v.to_string()),
|
|
9078
9080
|
}
|
|
9079
9081
|
}
|
|
9080
9082
|
}
|
|
@@ -9114,9 +9116,9 @@ impl From<Image> for liter_llm::types::Image {
|
|
|
9114
9116
|
impl From<liter_llm::types::Image> for Image {
|
|
9115
9117
|
fn from(val: liter_llm::types::Image) -> Self {
|
|
9116
9118
|
Self {
|
|
9117
|
-
url: val.url,
|
|
9118
|
-
b64_json: val.b64_json,
|
|
9119
|
-
revised_prompt: val.revised_prompt,
|
|
9119
|
+
url: val.url.map(|v| v.to_string()),
|
|
9120
|
+
b64_json: val.b64_json.map(|v| v.to_string()),
|
|
9121
|
+
revised_prompt: val.revised_prompt.map(|v| v.to_string()),
|
|
9120
9122
|
}
|
|
9121
9123
|
}
|
|
9122
9124
|
}
|
|
@@ -9138,10 +9140,10 @@ impl From<CreateSpeechRequest> for liter_llm::types::CreateSpeechRequest {
|
|
|
9138
9140
|
impl From<liter_llm::types::CreateSpeechRequest> for CreateSpeechRequest {
|
|
9139
9141
|
fn from(val: liter_llm::types::CreateSpeechRequest) -> Self {
|
|
9140
9142
|
Self {
|
|
9141
|
-
model: val.model,
|
|
9142
|
-
input: val.input,
|
|
9143
|
-
voice: val.voice,
|
|
9144
|
-
response_format: val.response_format,
|
|
9143
|
+
model: val.model.to_string(),
|
|
9144
|
+
input: val.input.to_string(),
|
|
9145
|
+
voice: val.voice.to_string(),
|
|
9146
|
+
response_format: val.response_format.map(|v| v.to_string()),
|
|
9145
9147
|
speed: val.speed,
|
|
9146
9148
|
}
|
|
9147
9149
|
}
|
|
@@ -9165,11 +9167,11 @@ impl From<CreateTranscriptionRequest> for liter_llm::types::CreateTranscriptionR
|
|
|
9165
9167
|
impl From<liter_llm::types::CreateTranscriptionRequest> for CreateTranscriptionRequest {
|
|
9166
9168
|
fn from(val: liter_llm::types::CreateTranscriptionRequest) -> Self {
|
|
9167
9169
|
Self {
|
|
9168
|
-
model: val.model,
|
|
9169
|
-
file: val.file,
|
|
9170
|
-
language: val.language,
|
|
9171
|
-
prompt: val.prompt,
|
|
9172
|
-
response_format: val.response_format,
|
|
9170
|
+
model: val.model.to_string(),
|
|
9171
|
+
file: val.file.to_string(),
|
|
9172
|
+
language: val.language.map(|v| v.to_string()),
|
|
9173
|
+
prompt: val.prompt.map(|v| v.to_string()),
|
|
9174
|
+
response_format: val.response_format.map(|v| v.to_string()),
|
|
9173
9175
|
temperature: val.temperature,
|
|
9174
9176
|
}
|
|
9175
9177
|
}
|
|
@@ -9191,8 +9193,8 @@ impl From<TranscriptionResponse> for liter_llm::types::TranscriptionResponse {
|
|
|
9191
9193
|
impl From<liter_llm::types::TranscriptionResponse> for TranscriptionResponse {
|
|
9192
9194
|
fn from(val: liter_llm::types::TranscriptionResponse) -> Self {
|
|
9193
9195
|
Self {
|
|
9194
|
-
text: val.text,
|
|
9195
|
-
language: val.language,
|
|
9196
|
+
text: val.text.to_string(),
|
|
9197
|
+
language: val.language.map(|v| v.to_string()),
|
|
9196
9198
|
duration: val.duration,
|
|
9197
9199
|
segments: val.segments.map(|v| v.into_iter().map(Into::into).collect()),
|
|
9198
9200
|
}
|
|
@@ -9218,7 +9220,7 @@ impl From<liter_llm::types::TranscriptionSegment> for TranscriptionSegment {
|
|
|
9218
9220
|
id: val.id,
|
|
9219
9221
|
start: val.start,
|
|
9220
9222
|
end: val.end,
|
|
9221
|
-
text: val.text,
|
|
9223
|
+
text: val.text.to_string(),
|
|
9222
9224
|
}
|
|
9223
9225
|
}
|
|
9224
9226
|
}
|
|
@@ -9238,7 +9240,7 @@ impl From<liter_llm::types::ModerationRequest> for ModerationRequest {
|
|
|
9238
9240
|
fn from(val: liter_llm::types::ModerationRequest) -> Self {
|
|
9239
9241
|
Self {
|
|
9240
9242
|
input: val.input.into(),
|
|
9241
|
-
model: val.model,
|
|
9243
|
+
model: val.model.map(|v| v.to_string()),
|
|
9242
9244
|
}
|
|
9243
9245
|
}
|
|
9244
9246
|
}
|
|
@@ -9258,8 +9260,8 @@ impl From<ModerationResponse> for liter_llm::types::ModerationResponse {
|
|
|
9258
9260
|
impl From<liter_llm::types::ModerationResponse> for ModerationResponse {
|
|
9259
9261
|
fn from(val: liter_llm::types::ModerationResponse) -> Self {
|
|
9260
9262
|
Self {
|
|
9261
|
-
id: val.id,
|
|
9262
|
-
model: val.model,
|
|
9263
|
+
id: val.id.to_string(),
|
|
9264
|
+
model: val.model.to_string(),
|
|
9263
9265
|
results: val.results.into_iter().map(Into::into).collect(),
|
|
9264
9266
|
}
|
|
9265
9267
|
}
|
|
@@ -9380,8 +9382,8 @@ impl From<RerankRequest> for liter_llm::types::RerankRequest {
|
|
|
9380
9382
|
impl From<liter_llm::types::RerankRequest> for RerankRequest {
|
|
9381
9383
|
fn from(val: liter_llm::types::RerankRequest) -> Self {
|
|
9382
9384
|
Self {
|
|
9383
|
-
model: val.model,
|
|
9384
|
-
query: val.query,
|
|
9385
|
+
model: val.model.to_string(),
|
|
9386
|
+
query: val.query.to_string(),
|
|
9385
9387
|
documents: val.documents.into_iter().map(Into::into).collect(),
|
|
9386
9388
|
top_n: val.top_n,
|
|
9387
9389
|
return_documents: val.return_documents,
|
|
@@ -9404,7 +9406,7 @@ impl From<RerankResponse> for liter_llm::types::RerankResponse {
|
|
|
9404
9406
|
impl From<liter_llm::types::RerankResponse> for RerankResponse {
|
|
9405
9407
|
fn from(val: liter_llm::types::RerankResponse) -> Self {
|
|
9406
9408
|
Self {
|
|
9407
|
-
id: val.id,
|
|
9409
|
+
id: val.id.map(|v| v.to_string()),
|
|
9408
9410
|
results: val.results.into_iter().map(Into::into).collect(),
|
|
9409
9411
|
meta: val.meta.as_ref().map(ToString::to_string),
|
|
9410
9412
|
}
|
|
@@ -9443,7 +9445,9 @@ impl From<RerankResultDocument> for liter_llm::types::RerankResultDocument {
|
|
|
9443
9445
|
#[allow(clippy::redundant_closure, clippy::useless_conversion)]
|
|
9444
9446
|
impl From<liter_llm::types::RerankResultDocument> for RerankResultDocument {
|
|
9445
9447
|
fn from(val: liter_llm::types::RerankResultDocument) -> Self {
|
|
9446
|
-
Self {
|
|
9448
|
+
Self {
|
|
9449
|
+
text: val.text.to_string(),
|
|
9450
|
+
}
|
|
9447
9451
|
}
|
|
9448
9452
|
}
|
|
9449
9453
|
|
|
@@ -9464,11 +9468,11 @@ impl From<SearchRequest> for liter_llm::types::SearchRequest {
|
|
|
9464
9468
|
impl From<liter_llm::types::SearchRequest> for SearchRequest {
|
|
9465
9469
|
fn from(val: liter_llm::types::SearchRequest) -> Self {
|
|
9466
9470
|
Self {
|
|
9467
|
-
model: val.model,
|
|
9468
|
-
query: val.query,
|
|
9471
|
+
model: val.model.to_string(),
|
|
9472
|
+
query: val.query.to_string(),
|
|
9469
9473
|
max_results: val.max_results,
|
|
9470
9474
|
search_domain_filter: val.search_domain_filter.map(|v| v.into_iter().collect()),
|
|
9471
|
-
country: val.country,
|
|
9475
|
+
country: val.country.map(|v| v.to_string()),
|
|
9472
9476
|
}
|
|
9473
9477
|
}
|
|
9474
9478
|
}
|
|
@@ -9488,7 +9492,7 @@ impl From<liter_llm::types::SearchResponse> for SearchResponse {
|
|
|
9488
9492
|
fn from(val: liter_llm::types::SearchResponse) -> Self {
|
|
9489
9493
|
Self {
|
|
9490
9494
|
results: val.results.into_iter().map(Into::into).collect(),
|
|
9491
|
-
model: val.model,
|
|
9495
|
+
model: val.model.to_string(),
|
|
9492
9496
|
}
|
|
9493
9497
|
}
|
|
9494
9498
|
}
|
|
@@ -9509,10 +9513,10 @@ impl From<SearchResult> for liter_llm::types::SearchResult {
|
|
|
9509
9513
|
impl From<liter_llm::types::SearchResult> for SearchResult {
|
|
9510
9514
|
fn from(val: liter_llm::types::SearchResult) -> Self {
|
|
9511
9515
|
Self {
|
|
9512
|
-
title: val.title,
|
|
9513
|
-
url: val.url,
|
|
9514
|
-
snippet: val.snippet,
|
|
9515
|
-
date: val.date,
|
|
9516
|
+
title: val.title.to_string(),
|
|
9517
|
+
url: val.url.to_string(),
|
|
9518
|
+
snippet: val.snippet.to_string(),
|
|
9519
|
+
date: val.date.map(|v| v.to_string()),
|
|
9516
9520
|
}
|
|
9517
9521
|
}
|
|
9518
9522
|
}
|
|
@@ -9533,7 +9537,7 @@ impl From<OcrRequest> for liter_llm::types::OcrRequest {
|
|
|
9533
9537
|
impl From<liter_llm::types::OcrRequest> for OcrRequest {
|
|
9534
9538
|
fn from(val: liter_llm::types::OcrRequest) -> Self {
|
|
9535
9539
|
Self {
|
|
9536
|
-
model: val.model,
|
|
9540
|
+
model: val.model.to_string(),
|
|
9537
9541
|
document: val.document.into(),
|
|
9538
9542
|
pages: val.pages.map(|v| v.into_iter().collect()),
|
|
9539
9543
|
include_image_base64: val.include_image_base64,
|
|
@@ -9557,7 +9561,7 @@ impl From<liter_llm::types::OcrResponse> for OcrResponse {
|
|
|
9557
9561
|
fn from(val: liter_llm::types::OcrResponse) -> Self {
|
|
9558
9562
|
Self {
|
|
9559
9563
|
pages: val.pages.into_iter().map(Into::into).collect(),
|
|
9560
|
-
model: val.model,
|
|
9564
|
+
model: val.model.to_string(),
|
|
9561
9565
|
usage: val.usage.map(Into::into),
|
|
9562
9566
|
}
|
|
9563
9567
|
}
|
|
@@ -9580,7 +9584,7 @@ impl From<liter_llm::types::OcrPage> for OcrPage {
|
|
|
9580
9584
|
fn from(val: liter_llm::types::OcrPage) -> Self {
|
|
9581
9585
|
Self {
|
|
9582
9586
|
index: val.index,
|
|
9583
|
-
markdown: val.markdown,
|
|
9587
|
+
markdown: val.markdown.to_string(),
|
|
9584
9588
|
images: val.images.map(|v| v.into_iter().map(Into::into).collect()),
|
|
9585
9589
|
dimensions: val.dimensions.map(Into::into),
|
|
9586
9590
|
}
|
|
@@ -9601,8 +9605,8 @@ impl From<OcrImage> for liter_llm::types::OcrImage {
|
|
|
9601
9605
|
impl From<liter_llm::types::OcrImage> for OcrImage {
|
|
9602
9606
|
fn from(val: liter_llm::types::OcrImage) -> Self {
|
|
9603
9607
|
Self {
|
|
9604
|
-
id: val.id,
|
|
9605
|
-
image_base64: val.image_base64,
|
|
9608
|
+
id: val.id.to_string(),
|
|
9609
|
+
image_base64: val.image_base64.map(|v| v.to_string()),
|
|
9606
9610
|
}
|
|
9607
9611
|
}
|
|
9608
9612
|
}
|
|
@@ -9641,7 +9645,7 @@ impl From<ModelsListResponse> for liter_llm::types::ModelsListResponse {
|
|
|
9641
9645
|
impl From<liter_llm::types::ModelsListResponse> for ModelsListResponse {
|
|
9642
9646
|
fn from(val: liter_llm::types::ModelsListResponse) -> Self {
|
|
9643
9647
|
Self {
|
|
9644
|
-
object: val.object,
|
|
9648
|
+
object: val.object.to_string(),
|
|
9645
9649
|
data: val.data.into_iter().map(Into::into).collect(),
|
|
9646
9650
|
}
|
|
9647
9651
|
}
|
|
@@ -9663,10 +9667,10 @@ impl From<ModelObject> for liter_llm::types::ModelObject {
|
|
|
9663
9667
|
impl From<liter_llm::types::ModelObject> for ModelObject {
|
|
9664
9668
|
fn from(val: liter_llm::types::ModelObject) -> Self {
|
|
9665
9669
|
Self {
|
|
9666
|
-
id: val.id,
|
|
9667
|
-
object: val.object,
|
|
9670
|
+
id: val.id.to_string(),
|
|
9671
|
+
object: val.object.to_string(),
|
|
9668
9672
|
created: val.created,
|
|
9669
|
-
owned_by: val.owned_by,
|
|
9673
|
+
owned_by: val.owned_by.to_string(),
|
|
9670
9674
|
}
|
|
9671
9675
|
}
|
|
9672
9676
|
}
|
|
@@ -9686,9 +9690,9 @@ impl From<CreateFileRequest> for liter_llm::types::CreateFileRequest {
|
|
|
9686
9690
|
impl From<liter_llm::types::CreateFileRequest> for CreateFileRequest {
|
|
9687
9691
|
fn from(val: liter_llm::types::CreateFileRequest) -> Self {
|
|
9688
9692
|
Self {
|
|
9689
|
-
file: val.file,
|
|
9693
|
+
file: val.file.to_string(),
|
|
9690
9694
|
purpose: val.purpose.into(),
|
|
9691
|
-
filename: val.filename,
|
|
9695
|
+
filename: val.filename.map(|v| v.to_string()),
|
|
9692
9696
|
}
|
|
9693
9697
|
}
|
|
9694
9698
|
}
|
|
@@ -9712,13 +9716,13 @@ impl From<FileObject> for liter_llm::types::FileObject {
|
|
|
9712
9716
|
impl From<liter_llm::types::FileObject> for FileObject {
|
|
9713
9717
|
fn from(val: liter_llm::types::FileObject) -> Self {
|
|
9714
9718
|
Self {
|
|
9715
|
-
id: val.id,
|
|
9716
|
-
object: val.object,
|
|
9719
|
+
id: val.id.to_string(),
|
|
9720
|
+
object: val.object.to_string(),
|
|
9717
9721
|
bytes: val.bytes,
|
|
9718
9722
|
created_at: val.created_at,
|
|
9719
|
-
filename: val.filename,
|
|
9720
|
-
purpose: val.purpose,
|
|
9721
|
-
status: val.status,
|
|
9723
|
+
filename: val.filename.to_string(),
|
|
9724
|
+
purpose: val.purpose.to_string(),
|
|
9725
|
+
status: val.status.map(|v| v.to_string()),
|
|
9722
9726
|
}
|
|
9723
9727
|
}
|
|
9724
9728
|
}
|
|
@@ -9738,7 +9742,7 @@ impl From<FileListResponse> for liter_llm::types::FileListResponse {
|
|
|
9738
9742
|
impl From<liter_llm::types::FileListResponse> for FileListResponse {
|
|
9739
9743
|
fn from(val: liter_llm::types::FileListResponse) -> Self {
|
|
9740
9744
|
Self {
|
|
9741
|
-
object: val.object,
|
|
9745
|
+
object: val.object.to_string(),
|
|
9742
9746
|
data: val.data.into_iter().map(Into::into).collect(),
|
|
9743
9747
|
has_more: val.has_more,
|
|
9744
9748
|
}
|
|
@@ -9760,9 +9764,9 @@ impl From<FileListQuery> for liter_llm::types::FileListQuery {
|
|
|
9760
9764
|
impl From<liter_llm::types::FileListQuery> for FileListQuery {
|
|
9761
9765
|
fn from(val: liter_llm::types::FileListQuery) -> Self {
|
|
9762
9766
|
Self {
|
|
9763
|
-
purpose: val.purpose,
|
|
9767
|
+
purpose: val.purpose.map(|v| v.to_string()),
|
|
9764
9768
|
limit: val.limit,
|
|
9765
|
-
after: val.after,
|
|
9769
|
+
after: val.after.map(|v| v.to_string()),
|
|
9766
9770
|
}
|
|
9767
9771
|
}
|
|
9768
9772
|
}
|
|
@@ -9782,8 +9786,8 @@ impl From<DeleteResponse> for liter_llm::types::DeleteResponse {
|
|
|
9782
9786
|
impl From<liter_llm::types::DeleteResponse> for DeleteResponse {
|
|
9783
9787
|
fn from(val: liter_llm::types::DeleteResponse) -> Self {
|
|
9784
9788
|
Self {
|
|
9785
|
-
id: val.id,
|
|
9786
|
-
object: val.object,
|
|
9789
|
+
id: val.id.to_string(),
|
|
9790
|
+
object: val.object.to_string(),
|
|
9787
9791
|
deleted: val.deleted,
|
|
9788
9792
|
}
|
|
9789
9793
|
}
|
|
@@ -9805,9 +9809,9 @@ impl From<CreateBatchRequest> for liter_llm::types::CreateBatchRequest {
|
|
|
9805
9809
|
impl From<liter_llm::types::CreateBatchRequest> for CreateBatchRequest {
|
|
9806
9810
|
fn from(val: liter_llm::types::CreateBatchRequest) -> Self {
|
|
9807
9811
|
Self {
|
|
9808
|
-
input_file_id: val.input_file_id,
|
|
9809
|
-
endpoint: val.endpoint,
|
|
9810
|
-
completion_window: val.completion_window,
|
|
9812
|
+
input_file_id: val.input_file_id.to_string(),
|
|
9813
|
+
endpoint: val.endpoint.to_string(),
|
|
9814
|
+
completion_window: val.completion_window.to_string(),
|
|
9811
9815
|
metadata: val.metadata.as_ref().map(ToString::to_string),
|
|
9812
9816
|
}
|
|
9813
9817
|
}
|
|
@@ -9839,14 +9843,14 @@ impl From<BatchObject> for liter_llm::types::BatchObject {
|
|
|
9839
9843
|
impl From<liter_llm::types::BatchObject> for BatchObject {
|
|
9840
9844
|
fn from(val: liter_llm::types::BatchObject) -> Self {
|
|
9841
9845
|
Self {
|
|
9842
|
-
id: val.id,
|
|
9843
|
-
object: val.object,
|
|
9844
|
-
endpoint: val.endpoint,
|
|
9845
|
-
input_file_id: val.input_file_id,
|
|
9846
|
-
completion_window: val.completion_window,
|
|
9846
|
+
id: val.id.to_string(),
|
|
9847
|
+
object: val.object.to_string(),
|
|
9848
|
+
endpoint: val.endpoint.to_string(),
|
|
9849
|
+
input_file_id: val.input_file_id.to_string(),
|
|
9850
|
+
completion_window: val.completion_window.to_string(),
|
|
9847
9851
|
status: val.status.into(),
|
|
9848
|
-
output_file_id: val.output_file_id,
|
|
9849
|
-
error_file_id: val.error_file_id,
|
|
9852
|
+
output_file_id: val.output_file_id.map(|v| v.to_string()),
|
|
9853
|
+
error_file_id: val.error_file_id.map(|v| v.to_string()),
|
|
9850
9854
|
created_at: val.created_at,
|
|
9851
9855
|
completed_at: val.completed_at,
|
|
9852
9856
|
failed_at: val.failed_at,
|
|
@@ -9896,11 +9900,11 @@ impl From<BatchListResponse> for liter_llm::types::BatchListResponse {
|
|
|
9896
9900
|
impl From<liter_llm::types::BatchListResponse> for BatchListResponse {
|
|
9897
9901
|
fn from(val: liter_llm::types::BatchListResponse) -> Self {
|
|
9898
9902
|
Self {
|
|
9899
|
-
object: val.object,
|
|
9903
|
+
object: val.object.to_string(),
|
|
9900
9904
|
data: val.data.into_iter().map(Into::into).collect(),
|
|
9901
9905
|
has_more: val.has_more,
|
|
9902
|
-
first_id: val.first_id,
|
|
9903
|
-
last_id: val.last_id,
|
|
9906
|
+
first_id: val.first_id.map(|v| v.to_string()),
|
|
9907
|
+
last_id: val.last_id.map(|v| v.to_string()),
|
|
9904
9908
|
}
|
|
9905
9909
|
}
|
|
9906
9910
|
}
|
|
@@ -9920,7 +9924,7 @@ impl From<liter_llm::types::BatchListQuery> for BatchListQuery {
|
|
|
9920
9924
|
fn from(val: liter_llm::types::BatchListQuery) -> Self {
|
|
9921
9925
|
Self {
|
|
9922
9926
|
limit: val.limit,
|
|
9923
|
-
after: val.after,
|
|
9927
|
+
after: val.after.map(|v| v.to_string()),
|
|
9924
9928
|
}
|
|
9925
9929
|
}
|
|
9926
9930
|
}
|
|
@@ -9944,9 +9948,9 @@ impl From<CreateResponseRequest> for liter_llm::types::CreateResponseRequest {
|
|
|
9944
9948
|
impl From<liter_llm::types::CreateResponseRequest> for CreateResponseRequest {
|
|
9945
9949
|
fn from(val: liter_llm::types::CreateResponseRequest) -> Self {
|
|
9946
9950
|
Self {
|
|
9947
|
-
model: val.model,
|
|
9951
|
+
model: val.model.to_string(),
|
|
9948
9952
|
input: val.input.to_string(),
|
|
9949
|
-
instructions: val.instructions,
|
|
9953
|
+
instructions: val.instructions.map(|v| v.to_string()),
|
|
9950
9954
|
tools: val.tools.map(|v| v.into_iter().map(Into::into).collect()),
|
|
9951
9955
|
temperature: val.temperature,
|
|
9952
9956
|
max_output_tokens: val.max_output_tokens,
|
|
@@ -9969,7 +9973,7 @@ impl From<ResponseTool> for liter_llm::types::ResponseTool {
|
|
|
9969
9973
|
impl From<liter_llm::types::ResponseTool> for ResponseTool {
|
|
9970
9974
|
fn from(val: liter_llm::types::ResponseTool) -> Self {
|
|
9971
9975
|
Self {
|
|
9972
|
-
tool_type: val.tool_type,
|
|
9976
|
+
tool_type: val.tool_type.to_string(),
|
|
9973
9977
|
config: val.config.to_string(),
|
|
9974
9978
|
}
|
|
9975
9979
|
}
|
|
@@ -9995,11 +9999,11 @@ impl From<ResponseObject> for liter_llm::types::ResponseObject {
|
|
|
9995
9999
|
impl From<liter_llm::types::ResponseObject> for ResponseObject {
|
|
9996
10000
|
fn from(val: liter_llm::types::ResponseObject) -> Self {
|
|
9997
10001
|
Self {
|
|
9998
|
-
id: val.id,
|
|
9999
|
-
object: val.object,
|
|
10002
|
+
id: val.id.to_string(),
|
|
10003
|
+
object: val.object.to_string(),
|
|
10000
10004
|
created_at: val.created_at,
|
|
10001
|
-
model: val.model,
|
|
10002
|
-
status: val.status,
|
|
10005
|
+
model: val.model.to_string(),
|
|
10006
|
+
status: val.status.to_string(),
|
|
10003
10007
|
output: val.output.into_iter().map(Into::into).collect(),
|
|
10004
10008
|
usage: val.usage.map(Into::into),
|
|
10005
10009
|
error: val.error.as_ref().map(ToString::to_string),
|
|
@@ -10021,7 +10025,7 @@ impl From<ResponseOutputItem> for liter_llm::types::ResponseOutputItem {
|
|
|
10021
10025
|
impl From<liter_llm::types::ResponseOutputItem> for ResponseOutputItem {
|
|
10022
10026
|
fn from(val: liter_llm::types::ResponseOutputItem) -> Self {
|
|
10023
10027
|
Self {
|
|
10024
|
-
item_type: val.item_type,
|
|
10028
|
+
item_type: val.item_type.to_string(),
|
|
10025
10029
|
content: val.content.to_string(),
|
|
10026
10030
|
}
|
|
10027
10031
|
}
|
|
@@ -10065,8 +10069,8 @@ impl From<CustomProviderConfig> for liter_llm::provider::custom::CustomProviderC
|
|
|
10065
10069
|
impl From<liter_llm::provider::custom::CustomProviderConfig> for CustomProviderConfig {
|
|
10066
10070
|
fn from(val: liter_llm::provider::custom::CustomProviderConfig) -> Self {
|
|
10067
10071
|
Self {
|
|
10068
|
-
name: val.name,
|
|
10069
|
-
base_url: val.base_url,
|
|
10072
|
+
name: val.name.to_string(),
|
|
10073
|
+
base_url: val.base_url.to_string(),
|
|
10070
10074
|
auth_header: val.auth_header.into(),
|
|
10071
10075
|
model_prefixes: val.model_prefixes.into_iter().collect(),
|
|
10072
10076
|
}
|
|
@@ -10094,9 +10098,9 @@ impl From<ProviderConfig> for liter_llm::provider::ProviderConfig {
|
|
|
10094
10098
|
impl From<liter_llm::provider::ProviderConfig> for ProviderConfig {
|
|
10095
10099
|
fn from(val: liter_llm::provider::ProviderConfig) -> Self {
|
|
10096
10100
|
Self {
|
|
10097
|
-
name: val.name,
|
|
10098
|
-
display_name: val.display_name,
|
|
10099
|
-
base_url: val.base_url,
|
|
10101
|
+
name: val.name.to_string(),
|
|
10102
|
+
display_name: val.display_name.map(|v| v.to_string()),
|
|
10103
|
+
base_url: val.base_url.map(|v| v.to_string()),
|
|
10100
10104
|
auth: val.auth.map(Into::into),
|
|
10101
10105
|
endpoints: val.endpoints.map(|v| v.into_iter().collect()),
|
|
10102
10106
|
model_prefixes: val.model_prefixes.map(|v| v.into_iter().collect()),
|
|
@@ -10122,7 +10126,7 @@ impl From<liter_llm::provider::AuthConfig> for AuthConfig {
|
|
|
10122
10126
|
fn from(val: liter_llm::provider::AuthConfig) -> Self {
|
|
10123
10127
|
Self {
|
|
10124
10128
|
auth_type: val.auth_type.into(),
|
|
10125
|
-
env_var: val.env_var,
|
|
10129
|
+
env_var: val.env_var.map(|v| v.to_string()),
|
|
10126
10130
|
}
|
|
10127
10131
|
}
|
|
10128
10132
|
}
|
|
@@ -10235,7 +10239,7 @@ impl From<ContentPart> for liter_llm::types::ContentPart {
|
|
|
10235
10239
|
impl From<liter_llm::types::ContentPart> for ContentPart {
|
|
10236
10240
|
fn from(val: liter_llm::types::ContentPart) -> Self {
|
|
10237
10241
|
match val {
|
|
10238
|
-
liter_llm::types::ContentPart::Text { text } => Self::Text { text },
|
|
10242
|
+
liter_llm::types::ContentPart::Text { text } => Self::Text { text: text.to_string() },
|
|
10239
10243
|
liter_llm::types::ContentPart::ImageUrl { image_url } => Self::ImageUrl {
|
|
10240
10244
|
image_url: image_url.into(),
|
|
10241
10245
|
},
|
|
@@ -10478,7 +10482,7 @@ impl From<liter_llm::types::RerankDocument> for RerankDocument {
|
|
|
10478
10482
|
fn from(val: liter_llm::types::RerankDocument) -> Self {
|
|
10479
10483
|
match val {
|
|
10480
10484
|
liter_llm::types::RerankDocument::Text(_0) => Self::Text(_0),
|
|
10481
|
-
liter_llm::types::RerankDocument::Object { text } => Self::Object { text },
|
|
10485
|
+
liter_llm::types::RerankDocument::Object { text } => Self::Object { text: text.to_string() },
|
|
10482
10486
|
}
|
|
10483
10487
|
}
|
|
10484
10488
|
}
|
|
@@ -10495,8 +10499,11 @@ impl From<OcrDocument> for liter_llm::types::OcrDocument {
|
|
|
10495
10499
|
impl From<liter_llm::types::OcrDocument> for OcrDocument {
|
|
10496
10500
|
fn from(val: liter_llm::types::OcrDocument) -> Self {
|
|
10497
10501
|
match val {
|
|
10498
|
-
liter_llm::types::OcrDocument::Url { url } => Self::Url { url },
|
|
10499
|
-
liter_llm::types::OcrDocument::Base64 { data, media_type } => Self::Base64 {
|
|
10502
|
+
liter_llm::types::OcrDocument::Url { url } => Self::Url { url: url.to_string() },
|
|
10503
|
+
liter_llm::types::OcrDocument::Base64 { data, media_type } => Self::Base64 {
|
|
10504
|
+
data: data.to_string(),
|
|
10505
|
+
media_type: media_type.to_string(),
|
|
10506
|
+
},
|
|
10500
10507
|
}
|
|
10501
10508
|
}
|
|
10502
10509
|
}
|
|
@@ -10567,7 +10574,7 @@ impl From<liter_llm::provider::custom::AuthHeaderFormat> for AuthHeaderFormat {
|
|
|
10567
10574
|
fn from(val: liter_llm::provider::custom::AuthHeaderFormat) -> Self {
|
|
10568
10575
|
match val {
|
|
10569
10576
|
liter_llm::provider::custom::AuthHeaderFormat::Bearer => Self::Bearer,
|
|
10570
|
-
liter_llm::provider::custom::AuthHeaderFormat::ApiKey(_0) => Self::ApiKey { _0 },
|
|
10577
|
+
liter_llm::provider::custom::AuthHeaderFormat::ApiKey(_0) => Self::ApiKey { _0: _0.to_string() },
|
|
10571
10578
|
liter_llm::provider::custom::AuthHeaderFormat::None => Self::None,
|
|
10572
10579
|
}
|
|
10573
10580
|
}
|
data/lib/liter_llm/native.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:2056fea64bf6b2c8a4850aaade9cf52a7d3d9ba731594e4cc276f6f5dc460e32
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify --exit-code
|
|
5
5
|
# frozen_string_literal: true
|
data/lib/liter_llm/version.rb
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:2056fea64bf6b2c8a4850aaade9cf52a7d3d9ba731594e4cc276f6f5dc460e32
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify --exit-code
|
|
5
5
|
# frozen_string_literal: true
|
|
6
6
|
|
|
7
7
|
module LiterLlm
|
|
8
|
-
VERSION = "1.4.0.pre.rc.
|
|
8
|
+
VERSION = "1.4.0.pre.rc.59"
|
|
9
9
|
end
|
data/lib/liter_llm.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:2056fea64bf6b2c8a4850aaade9cf52a7d3d9ba731594e4cc276f6f5dc460e32
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify --exit-code
|
|
5
5
|
# frozen_string_literal: true
|
data/sig/types.rbs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:2056fea64bf6b2c8a4850aaade9cf52a7d3d9ba731594e4cc276f6f5dc460e32
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify --exit-code
|
|
5
5
|
|