text-translate/Cargo.toml
flemming-it c54c14b28a
Some checks failed
CI / Linux x86_64 (Forgejo) (push) Failing after 2s
sign-bundle / sign (push) Failing after 1m51s
feat: selectable wire format — ollama (default), openai (vLLM etc.), anthropic
Port the multi-API client from llm.chat (llm.rs kept in lockstep):
the optional api input selects the dialect, default stays the
unchanged v0.1.x Ollama behavior. openai covers vLLM, LM Studio,
LiteLLM and cloud OpenAI; api-specific error hints; api_key sent
as Bearer (ollama/openai) or x-api-key (anthropic). model_digest
stays an Ollama-only best-effort probe and is documented as such.

Proven end-to-end against a hermetic OpenAI-wire fake (request
shape validated, response parsed) via a hub flow run.

Signed-off-by: flemming-it <sf@flemming.it>
2026-08-20 16:32:59 +02:00

49 lines
1.1 KiB
TOML

# Standalone Cargo.toml — targets wasm32-wasip2.
#
# Build with:
# cargo build --release --target wasm32-wasip2
[package]
name = "text_translate"
version = "0.2.0"
edition = "2024"
license = "Apache-2.0"
publish = false
description = "F∆I module providing text.translate"
[lib]
# cdylib for the wasm artifact, rlib so integration tests can
# link against the module's `invoke` function on the host.
crate-type = ["cdylib", "rlib"]
[dependencies]
chain-module-sdk = { git = "https://git.flemming.ai/fai/chain-module-sdk-rust.git", tag = "v0.3.0" }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
thiserror = "2"
# WASI-0.2 HTTP client. Only compiled into the wasm32-wasip2 build.
[target.'cfg(target_arch = "wasm32")'.dependencies]
waki = "0.5"
[dev-dependencies]
serde_json = "1"
[profile.release]
opt-level = "s"
lto = true
codegen-units = 1
strip = "symbols"
[lints.rust]
unsafe_op_in_unsafe_fn = "warn"
[lints.clippy]
unwrap_used = "deny"
expect_used = "deny"
panic = "deny"
print_stdout = "deny"
print_stderr = "deny"
[workspace]
# Empty so this package is NOT picked up by a parent.