[package]
edition = "2024"
name = "genai"
version = "0.6.0-beta.21"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Multi-AI Providers Library for Rust. (OpenAI, Gemini, Anthropic, xAI, Ollama, Groq, DeepSeek, Grok, GitHub Copilot)"
homepage = "https://github.com/jeremychone/rust-genai"
readme = "README.md"
keywords = [
"generative-ai",
"openai",
"chatgpt",
"gemini",
"ollama",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/jeremychone/rust-genai"
[features]
bedrock-sigv4 = [
"dep:aws-config",
"dep:aws-credential-types",
"dep:aws-sigv4",
]
default = []
[lib]
name = "genai"
path = "src/lib.rs"
[[example]]
name = "c00-readme"
path = "examples/c00-readme.rs"
[[example]]
name = "c01-conv"
path = "examples/c01-conv.rs"
[[example]]
name = "c02-auth"
path = "examples/c02-auth.rs"
[[example]]
name = "c03-mapper"
path = "examples/c03-mapper.rs"
[[example]]
name = "c04-chat-options"
path = "examples/c04-chat-options.rs"
[[example]]
name = "c05-model-names"
path = "examples/c05-model-names.rs"
[[example]]
name = "c06-model-spec"
path = "examples/c06-model-spec.rs"
[[example]]
name = "c06-target-resolver"
path = "examples/c06-target-resolver.rs"
[[example]]
name = "c07-image"
path = "examples/c07-image.rs"
[[example]]
name = "c08-image-gen"
path = "examples/c08-image-gen.rs"
[[example]]
name = "c09-cache-ttl"
path = "examples/c09-cache-ttl.rs"
[[example]]
name = "c10-aihubmix"
path = "examples/c10-aihubmix.rs"
[[example]]
name = "c11-openai-resp-reasoning-roundtrip"
path = "examples/c11-openai-resp-reasoning-roundtrip.rs"
[[example]]
name = "c20-tooluse"
path = "examples/c20-tooluse.rs"
[[example]]
name = "c21-tooluse-streaming"
path = "examples/c21-tooluse-streaming.rs"
[[example]]
name = "c22-tooluse-deterministic"
path = "examples/c22-tooluse-deterministic.rs"
[[example]]
name = "c23-tool-web-search"
path = "examples/c23-tool-web-search.rs"
[[example]]
name = "c99-baidu"
path = "examples/c99-baidu.rs"
[[example]]
name = "c99-bedrock-api"
path = "examples/c99-bedrock-api.rs"
[[example]]
name = "c99-bedrock-sigv4"
path = "examples/c99-bedrock-sigv4.rs"
[[example]]
name = "c99-github-copilot"
path = "examples/c99-github-copilot.rs"
[[example]]
name = "c99-google-gcp"
path = "examples/c99-google-gcp.rs"
[[example]]
name = "c99-ollama-cloud"
path = "examples/c99-ollama-cloud.rs"
[[example]]
name = "c99-zai"
path = "examples/c99-zai.rs"
[[example]]
name = "e01-embed-basic"
path = "examples/e01-embed-basic.rs"
[[test]]
name = "tests_p_aihubmix"
path = "tests/tests_p_aihubmix.rs"
[[test]]
name = "tests_p_anthropic"
path = "tests/tests_p_anthropic.rs"
[[test]]
name = "tests_p_cohere"
path = "tests/tests_p_cohere.rs"
[[test]]
name = "tests_p_cohere_embeddings"
path = "tests/tests_p_cohere_embeddings.rs"
[[test]]
name = "tests_p_deepseek"
path = "tests/tests_p_deepseek.rs"
[[test]]
name = "tests_p_deepseek_reasoning"
path = "tests/tests_p_deepseek_reasoning.rs"
[[test]]
name = "tests_p_fireworks"
path = "tests/tests_p_fireworks.rs"
[[test]]
name = "tests_p_gemini"
path = "tests/tests_p_gemini.rs"
[[test]]
name = "tests_p_gemini_embeddings"
path = "tests/tests_p_gemini_embeddings.rs"
[[test]]
name = "tests_p_gemini_image"
path = "tests/tests_p_gemini_image.rs"
[[test]]
name = "tests_p_gemini_reasoning"
path = "tests/tests_p_gemini_reasoning.rs"
[[test]]
name = "tests_p_github_copilot"
path = "tests/tests_p_github_copilot.rs"
[[test]]
name = "tests_p_groq"
path = "tests/tests_p_groq.rs"
[[test]]
name = "tests_p_groq_reasoning"
path = "tests/tests_p_groq_reasoning.rs"
[[test]]
name = "tests_p_ollama"
path = "tests/tests_p_ollama.rs"
[[test]]
name = "tests_p_ollama_cloud"
path = "tests/tests_p_ollama_cloud.rs"
[[test]]
name = "tests_p_ollama_reasoning"
path = "tests/tests_p_ollama_reasoning.rs"
[[test]]
name = "tests_p_openai"
path = "tests/tests_p_openai.rs"
[[test]]
name = "tests_p_openai_embeddings"
path = "tests/tests_p_openai_embeddings.rs"
[[test]]
name = "tests_p_openai_reasoning"
path = "tests/tests_p_openai_reasoning.rs"
[[test]]
name = "tests_p_openai_resp"
path = "tests/tests_p_openai_resp.rs"
[[test]]
name = "tests_p_together"
path = "tests/tests_p_together.rs"
[[test]]
name = "tests_p_vertex"
path = "tests/tests_p_vertex.rs"
[[test]]
name = "tests_p_xai"
path = "tests/tests_p_xai.rs"
[[test]]
name = "tests_p_zai"
path = "tests/tests_p_zai.rs"
[[test]]
name = "tests_p_zai_reasoning"
path = "tests/tests_p_zai_reasoning.rs"
[[test]]
name = "tests_yakbak_aihubmix"
path = "tests/tests_yakbak_aihubmix.rs"
[[test]]
name = "tests_yakbak_anthropic"
path = "tests/tests_yakbak_anthropic.rs"
[[test]]
name = "tests_yakbak_gemini"
path = "tests/tests_yakbak_gemini.rs"
[[test]]
name = "tests_yakbak_github_copilot"
path = "tests/tests_yakbak_github_copilot.rs"
[[test]]
name = "tests_yakbak_ollama_cloud"
path = "tests/tests_yakbak_ollama_cloud.rs"
[[test]]
name = "tests_yakbak_openai"
path = "tests/tests_yakbak_openai.rs"
[[test]]
name = "tests_yakbak_openai_resp"
path = "tests/tests_yakbak_openai_resp.rs"
[[test]]
name = "tests_yakbak_opencode_go"
path = "tests/tests_yakbak_opencode_go.rs"
[[test]]
name = "tests_yakbak_record"
path = "tests/tests_yakbak_record.rs"
[dependencies.aws-config]
version = "1"
optional = true
[dependencies.aws-credential-types]
version = "1"
optional = true
[dependencies.aws-sigv4]
version = "1"
optional = true
[dependencies.base64]
version = "0.22.0"
[dependencies.bytes]
version = "1.6"
[dependencies.derive_more]
version = "2"
features = [
"from",
"display",
]
[dependencies.eventsource-stream]
version = "0.2"
[dependencies.futures]
version = "0.3"
[dependencies.mime_guess]
version = "2"
[dependencies.paste]
version = "1"
[dependencies.regex]
version = "1"
[dependencies.reqwest]
version = "0.13"
features = [
"json",
"stream",
"gzip",
]
[dependencies.serde]
version = "1"
features = [
"derive",
"rc",
]
[dependencies.serde_json]
version = "1"
[dependencies.serde_with]
version = "3"
[dependencies.strum]
version = "0.28"
features = ["derive"]
[dependencies.tokio]
version = "1"
features = [
"macros",
"rt-multi-thread",
"io-std",
"test-util",
"io-util",
]
[dependencies.tokio-stream]
version = "0.1"
[dependencies.tracing]
version = "0.1"
features = ["default"]
[dependencies.uuid]
version = "1.21.0"
features = ["v4"]
[dependencies.value-ext]
version = "0.1.3"
[dev-dependencies.base64]
version = "0.22.0"
[dev-dependencies.bitflags]
version = "2.8"
[dev-dependencies.gcp_auth]
version = "0.12"
[dev-dependencies.http-body-util]
version = "0.1"
[dev-dependencies.hyper]
version = "1"
features = [
"http1",
"server",
]
[dev-dependencies.hyper-util]
version = "0.1"
features = [
"tokio",
"http1",
]
[dev-dependencies.serial_test]
version = "3.2"
[dev-dependencies.simple-fs]
version = "0.12"
[dev-dependencies.tracing-subscriber]
version = "0.3"
features = ["env-filter"]
[lints.rust]
unsafe_code = "forbid"