simple-agents-py 0.1.2__tar.gz → 0.1.5__tar.gz
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.
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/Cargo.lock +12 -11
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/Cargo.toml +1 -1
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/PKG-INFO +1 -1
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-core/Cargo.toml +4 -4
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-healing/Cargo.toml +1 -1
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-macros/Cargo.toml +1 -1
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/Cargo.toml +1 -1
- simple_agents_py-0.1.5/crates/simple-agents-py/Cargo.toml +19 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-py/src/lib.rs +25 -1
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/pyproject.toml +1 -1
- simple_agents_py-0.1.2/crates/simple-agents-py/Cargo.toml +0 -18
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/README.md +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agent-type/Cargo.toml +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agent-type/README.md +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agent-type/TEST_GUIDE.md +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agent-type/TODO.md +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agent-type/examples/basic_usage.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agent-type/examples/mock_provider.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agent-type/src/cache.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agent-type/src/coercion.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agent-type/src/config.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agent-type/src/error.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agent-type/src/lib.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agent-type/src/message.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agent-type/src/provider.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agent-type/src/request.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agent-type/src/response.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agent-type/src/router.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agent-type/src/validation.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agent-type/tests/integration_test.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-cache/Cargo.toml +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-cache/src/lib.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-cache/src/memory.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-cache/src/noop.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-core/README.md +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-core/examples/basic_client.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-core/src/client.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-core/src/healing.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-core/src/lib.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-core/src/middleware.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-core/src/routing.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-core/tests/client_integration.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-healing/README.md +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-healing/benches/parser_benchmarks.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-healing/examples/basic_healing.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-healing/examples/coercion_demo.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-healing/examples/streaming_annotations.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-healing/examples/streaming_partial_types.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-healing/src/coercion.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-healing/src/lib.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-healing/src/parser.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-healing/src/schema.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-healing/src/streaming.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-healing/src/string_utils.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-healing/tests/parser_tests.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-healing/tests/property_tests.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-healing/tests/stream_annotations_tests.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-healing/tests/streaming_tests.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-macros/README.md +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-macros/src/lib.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-macros/src/partial.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-macros/tests/partial_type_tests.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/README.md +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/examples/anthropic_basic.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/examples/anthropic_structured_output.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/examples/cache_usage.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/examples/custom_api.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/examples/healing_fallback.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/examples/openai_basic.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/examples/openai_structured_output.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/examples/openrouter_basic.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/examples/retry_demo.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/examples/streaming.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/examples/streaming_structured.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/examples/streaming_with_healing.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/examples/test_local_api.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/examples/test_reqwest.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/run_integration_tests.sh +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/anthropic/error.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/anthropic/mod.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/anthropic/models.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/anthropic/streaming.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/common/error.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/common/http_client.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/common/mod.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/healing_integration.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/lib.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/metrics.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/openai/error.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/openai/mod.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/openai/models.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/openai/streaming.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/openrouter/mod.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/rate_limit.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/retry.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/schema_converter.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/streaming_structured.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/utils.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/tests/README.md +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/tests/healing_integration_tests.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/tests/openai_integration.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-py/README.md +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-py/tests/test_client.py +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-router/Cargo.toml +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-router/examples/round_robin_router.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-router/src/circuit_breaker.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-router/src/cost.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-router/src/fallback.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-router/src/health.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-router/src/latency.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-router/src/lib.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-router/src/retry.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-router/src/round_robin.rs +0 -0
- {simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-router/tests/health_tracker_integration.rs +0 -0
|
@@ -2025,7 +2025,7 @@ dependencies = [
|
|
|
2025
2025
|
|
|
2026
2026
|
[[package]]
|
|
2027
2027
|
name = "simple-agent-type"
|
|
2028
|
-
version = "0.1.
|
|
2028
|
+
version = "0.1.5"
|
|
2029
2029
|
dependencies = [
|
|
2030
2030
|
"async-trait",
|
|
2031
2031
|
"blake3",
|
|
@@ -2040,7 +2040,7 @@ dependencies = [
|
|
|
2040
2040
|
|
|
2041
2041
|
[[package]]
|
|
2042
2042
|
name = "simple-agents-cache"
|
|
2043
|
-
version = "0.1.
|
|
2043
|
+
version = "0.1.5"
|
|
2044
2044
|
dependencies = [
|
|
2045
2045
|
"async-trait",
|
|
2046
2046
|
"simple-agent-type",
|
|
@@ -2049,7 +2049,7 @@ dependencies = [
|
|
|
2049
2049
|
|
|
2050
2050
|
[[package]]
|
|
2051
2051
|
name = "simple-agents-cli"
|
|
2052
|
-
version = "0.1.
|
|
2052
|
+
version = "0.1.5"
|
|
2053
2053
|
dependencies = [
|
|
2054
2054
|
"clap",
|
|
2055
2055
|
"serde",
|
|
@@ -2066,7 +2066,7 @@ dependencies = [
|
|
|
2066
2066
|
|
|
2067
2067
|
[[package]]
|
|
2068
2068
|
name = "simple-agents-core"
|
|
2069
|
-
version = "0.1.
|
|
2069
|
+
version = "0.1.5"
|
|
2070
2070
|
dependencies = [
|
|
2071
2071
|
"async-trait",
|
|
2072
2072
|
"serde",
|
|
@@ -2093,7 +2093,7 @@ dependencies = [
|
|
|
2093
2093
|
|
|
2094
2094
|
[[package]]
|
|
2095
2095
|
name = "simple-agents-ffi"
|
|
2096
|
-
version = "0.1.
|
|
2096
|
+
version = "0.1.5"
|
|
2097
2097
|
dependencies = [
|
|
2098
2098
|
"async-trait",
|
|
2099
2099
|
"simple-agent-type",
|
|
@@ -2104,7 +2104,7 @@ dependencies = [
|
|
|
2104
2104
|
|
|
2105
2105
|
[[package]]
|
|
2106
2106
|
name = "simple-agents-healing"
|
|
2107
|
-
version = "0.1.
|
|
2107
|
+
version = "0.1.5"
|
|
2108
2108
|
dependencies = [
|
|
2109
2109
|
"criterion",
|
|
2110
2110
|
"proptest",
|
|
@@ -2120,7 +2120,7 @@ dependencies = [
|
|
|
2120
2120
|
|
|
2121
2121
|
[[package]]
|
|
2122
2122
|
name = "simple-agents-macros"
|
|
2123
|
-
version = "0.1.
|
|
2123
|
+
version = "0.1.5"
|
|
2124
2124
|
dependencies = [
|
|
2125
2125
|
"proc-macro2",
|
|
2126
2126
|
"quote",
|
|
@@ -2132,7 +2132,7 @@ dependencies = [
|
|
|
2132
2132
|
|
|
2133
2133
|
[[package]]
|
|
2134
2134
|
name = "simple-agents-napi"
|
|
2135
|
-
version = "0.1.
|
|
2135
|
+
version = "0.1.5"
|
|
2136
2136
|
dependencies = [
|
|
2137
2137
|
"napi",
|
|
2138
2138
|
"napi-derive",
|
|
@@ -2144,7 +2144,7 @@ dependencies = [
|
|
|
2144
2144
|
|
|
2145
2145
|
[[package]]
|
|
2146
2146
|
name = "simple-agents-providers"
|
|
2147
|
-
version = "0.1.
|
|
2147
|
+
version = "0.1.5"
|
|
2148
2148
|
dependencies = [
|
|
2149
2149
|
"async-trait",
|
|
2150
2150
|
"bytes",
|
|
@@ -2172,9 +2172,10 @@ dependencies = [
|
|
|
2172
2172
|
|
|
2173
2173
|
[[package]]
|
|
2174
2174
|
name = "simple-agents-py"
|
|
2175
|
-
version = "0.1.
|
|
2175
|
+
version = "0.1.5"
|
|
2176
2176
|
dependencies = [
|
|
2177
2177
|
"pyo3",
|
|
2178
|
+
"reqwest",
|
|
2178
2179
|
"simple-agent-type",
|
|
2179
2180
|
"simple-agents-core",
|
|
2180
2181
|
"simple-agents-providers",
|
|
@@ -2183,7 +2184,7 @@ dependencies = [
|
|
|
2183
2184
|
|
|
2184
2185
|
[[package]]
|
|
2185
2186
|
name = "simple-agents-router"
|
|
2186
|
-
version = "0.1.
|
|
2187
|
+
version = "0.1.5"
|
|
2187
2188
|
dependencies = [
|
|
2188
2189
|
"async-trait",
|
|
2189
2190
|
"rand 0.8.5",
|
|
@@ -17,10 +17,10 @@ serde.workspace = true
|
|
|
17
17
|
serde_json.workspace = true
|
|
18
18
|
tokio.workspace = true
|
|
19
19
|
|
|
20
|
-
simple-agent-type = { path = "../simple-agent-type" }
|
|
21
|
-
simple-agents-router = { path = "../simple-agents-router" }
|
|
22
|
-
simple-agents-cache = { path = "../simple-agents-cache" }
|
|
23
|
-
simple-agents-healing = { path = "../simple-agents-healing" }
|
|
20
|
+
simple-agent-type = { path = "../simple-agent-type", version = "0.1.0" }
|
|
21
|
+
simple-agents-router = { path = "../simple-agents-router", version = "0.1.0" }
|
|
22
|
+
simple-agents-cache = { path = "../simple-agents-cache", version = "0.1.0" }
|
|
23
|
+
simple-agents-healing = { path = "../simple-agents-healing", version = "0.1.0" }
|
|
24
24
|
|
|
25
25
|
[dev-dependencies]
|
|
26
26
|
tokio.workspace = true
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "simple-agents-py"
|
|
3
|
+
version.workspace = true
|
|
4
|
+
edition = "2021"
|
|
5
|
+
license = "MIT OR Apache-2.0"
|
|
6
|
+
readme = "README.md"
|
|
7
|
+
|
|
8
|
+
[lib]
|
|
9
|
+
name = "simple_agents_py"
|
|
10
|
+
crate-type = ["cdylib"]
|
|
11
|
+
|
|
12
|
+
[dependencies]
|
|
13
|
+
pyo3 = { version = "0.22", features = ["extension-module", "abi3-py312"] }
|
|
14
|
+
tokio = { workspace = true }
|
|
15
|
+
reqwest = { workspace = true }
|
|
16
|
+
|
|
17
|
+
simple-agents-core = { path = "../simple-agents-core", version = "0.1.0" }
|
|
18
|
+
simple-agents-providers = { path = "../simple-agents-providers", version = "0.1.0" }
|
|
19
|
+
simple-agent-type = { path = "../simple-agent-type", version = "0.1.0" }
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
use pyo3::exceptions::PyRuntimeError;
|
|
6
6
|
use pyo3::prelude::*;
|
|
7
|
+
use reqwest::Client as HttpClient;
|
|
7
8
|
use simple_agents_core::{SimpleAgentsClient, SimpleAgentsClientBuilder};
|
|
8
9
|
use simple_agents_providers::anthropic::AnthropicProvider;
|
|
9
10
|
use simple_agents_providers::openai::OpenAIProvider;
|
|
@@ -11,6 +12,7 @@ use simple_agents_providers::openrouter::OpenRouterProvider;
|
|
|
11
12
|
use simple_agent_type::message::Message;
|
|
12
13
|
use simple_agent_type::prelude::{ApiKey, CompletionRequest, Provider, Result, SimpleAgentsError};
|
|
13
14
|
use std::sync::{Arc, Mutex};
|
|
15
|
+
use std::time::Duration;
|
|
14
16
|
|
|
15
17
|
type Runtime = tokio::runtime::Runtime;
|
|
16
18
|
|
|
@@ -34,7 +36,25 @@ fn provider_from_params(
|
|
|
34
36
|
"openai" => {
|
|
35
37
|
let provider = match api_key {
|
|
36
38
|
Some(api_key) => match api_base {
|
|
37
|
-
Some(api_base) =>
|
|
39
|
+
Some(api_base) => {
|
|
40
|
+
if is_local_base(api_base) {
|
|
41
|
+
let client = HttpClient::builder()
|
|
42
|
+
.timeout(Duration::from_secs(30))
|
|
43
|
+
.pool_max_idle_per_host(10)
|
|
44
|
+
.pool_idle_timeout(Duration::from_secs(90))
|
|
45
|
+
.no_proxy()
|
|
46
|
+
.build()
|
|
47
|
+
.map_err(|e| {
|
|
48
|
+
SimpleAgentsError::Config(format!(
|
|
49
|
+
"Failed to create HTTP client: {}",
|
|
50
|
+
e
|
|
51
|
+
))
|
|
52
|
+
})?;
|
|
53
|
+
OpenAIProvider::with_client(api_key, api_base.to_string(), client)?
|
|
54
|
+
} else {
|
|
55
|
+
OpenAIProvider::with_base_url(api_key, api_base.to_string())?
|
|
56
|
+
}
|
|
57
|
+
}
|
|
38
58
|
None => OpenAIProvider::new(api_key)?,
|
|
39
59
|
},
|
|
40
60
|
None => OpenAIProvider::from_env()?,
|
|
@@ -71,6 +91,10 @@ fn provider_from_params(
|
|
|
71
91
|
}
|
|
72
92
|
}
|
|
73
93
|
|
|
94
|
+
fn is_local_base(api_base: &str) -> bool {
|
|
95
|
+
api_base.contains("localhost") || api_base.contains("127.0.0.1")
|
|
96
|
+
}
|
|
97
|
+
|
|
74
98
|
fn build_request(
|
|
75
99
|
model: &str,
|
|
76
100
|
prompt: &str,
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
[package]
|
|
2
|
-
name = "simple-agents-py"
|
|
3
|
-
version = "0.1.2"
|
|
4
|
-
edition = "2021"
|
|
5
|
-
license = "MIT OR Apache-2.0"
|
|
6
|
-
readme = "README.md"
|
|
7
|
-
|
|
8
|
-
[lib]
|
|
9
|
-
name = "simple_agents_py"
|
|
10
|
-
crate-type = ["cdylib"]
|
|
11
|
-
|
|
12
|
-
[dependencies]
|
|
13
|
-
pyo3 = { version = "0.22", features = ["extension-module", "abi3-py312"] }
|
|
14
|
-
tokio = { workspace = true }
|
|
15
|
-
|
|
16
|
-
simple-agents-core = { path = "../simple-agents-core" }
|
|
17
|
-
simple-agents-providers = { path = "../simple-agents-providers" }
|
|
18
|
-
simple-agent-type = { path = "../simple-agent-type" }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agent-type/examples/basic_usage.rs
RENAMED
|
File without changes
|
{simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agent-type/examples/mock_provider.rs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agent-type/src/validation.rs
RENAMED
|
File without changes
|
{simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agent-type/tests/integration_test.rs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-core/examples/basic_client.rs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-core/src/middleware.rs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-healing/src/coercion.rs
RENAMED
|
File without changes
|
|
File without changes
|
{simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-healing/src/parser.rs
RENAMED
|
File without changes
|
{simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-healing/src/schema.rs
RENAMED
|
File without changes
|
{simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-healing/src/streaming.rs
RENAMED
|
File without changes
|
{simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-healing/src/string_utils.rs
RENAMED
|
File without changes
|
{simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-healing/tests/parser_tests.rs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-macros/src/partial.rs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/common/error.rs
RENAMED
|
File without changes
|
|
File without changes
|
{simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/common/mod.rs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/metrics.rs
RENAMED
|
File without changes
|
{simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/openai/error.rs
RENAMED
|
File without changes
|
{simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/openai/mod.rs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/rate_limit.rs
RENAMED
|
File without changes
|
{simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/retry.rs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/src/utils.rs
RENAMED
|
File without changes
|
{simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-providers/tests/README.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-py/tests/test_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-router/src/circuit_breaker.rs
RENAMED
|
File without changes
|
|
File without changes
|
{simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-router/src/fallback.rs
RENAMED
|
File without changes
|
|
File without changes
|
{simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-router/src/latency.rs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{simple_agents_py-0.1.2 → simple_agents_py-0.1.5}/crates/simple-agents-router/src/round_robin.rs
RENAMED
|
File without changes
|
|
File without changes
|