# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
name = "ambi"
version = "0.3.2"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A flexible, multi-backend, customizable AI agent framework, entirely based on Rust."
readme = "README.md"
keywords = [
    "ai",
    "agent",
    "llm",
    "llama",
    "openai",
]
categories = [
    "artificial-intelligence",
    "api-bindings",
    "asynchronous",
]
license = "Apache-2.0"
repository = "https://github.com/Maskviva/Ambi"

[package.metadata.wasm-pack.profile.dev]
wasm-opt = false

[package.metadata.docs.rs]
features = [
    "openai-api",
    "llama-cpp",
    "mtmd",
    "macro",
]
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[features]
cuda = [
    "llama-cpp",
    "llama-cpp-2/cuda",
    "llama-cpp-sys-2/cuda",
]
default = ["openai-api"]
llama-cpp = [
    "dep:llama-cpp-2",
    "dep:llama-cpp-sys-2",
]
macro = ["dep:ambi-macros"]
metal = [
    "llama-cpp",
    "llama-cpp-2/metal",
    "llama-cpp-sys-2/metal",
]
mtmd = [
    "llama-cpp",
    "llama-cpp-2/mtmd",
    "llama-cpp-sys-2/mtmd",
    "dep:base64",
]
openai-api = ["dep:async-openai"]
rocm = [
    "llama-cpp",
    "llama-cpp-2/rocm",
    "llama-cpp-sys-2/rocm",
]
vulkan = [
    "llama-cpp",
    "llama-cpp-2/vulkan",
    "llama-cpp-sys-2/vulkan",
]

[lib]
name = "ambi"
crate-type = [
    "cdylib",
    "rlib",
]
path = "src/lib.rs"

[[example]]
name = "chat_cloud"
path = "examples/chat_cloud.rs"
required-features = ["openai-api"]

[[example]]
name = "chat_local"
path = "examples/chat_local.rs"
required-features = ["llama-cpp"]

[[example]]
name = "chat_stream"
path = "examples/chat_stream.rs"
required-features = ["openai-api"]

[[example]]
name = "custom_chat_template"
path = "examples/custom_chat_template.rs"
required-features = ["openai-api"]

[[example]]
name = "custom_model_back"
path = "examples/custom_model_back.rs"

[[example]]
name = "custom_tool"
path = "examples/custom_tool.rs"
required-features = ["openai-api"]

[[example]]
name = "custom_tool_in_macro"
path = "examples/custom_tool_in_macro.rs"
required-features = [
    "openai-api",
    "macro",
]

[[example]]
name = "custom_tool_parser"
path = "examples/custom_tool_parser.rs"
required-features = ["openai-api"]

[[example]]
name = "memory_eviction_handler"
path = "examples/memory_eviction_handler.rs"
required-features = ["openai-api"]

[[test]]
name = "api_test"
path = "tests/api_test.rs"

[[test]]
name = "local_text"
path = "tests/local_text.rs"

[dependencies.ambi-macros]
version = "0.1.1"
optional = true

[dependencies.anyhow]
version = "1.0.102"

[dependencies.async-openai]
version = "0.36.0"
features = ["full"]
optional = true

[dependencies.async-trait]
version = "0.1.89"

[dependencies.base64]
version = "0.22.1"
optional = true

[dependencies.futures]
version = "0.3.32"

[dependencies.llama-cpp-2]
version = "0.1.145"
optional = true

[dependencies.llama-cpp-sys-2]
version = "0.1.145"
optional = true

[dependencies.log]
version = "0.4"

[dependencies.serde]
version = "1.0.228"
features = [
    "derive",
    "rc",
]

[dependencies.serde_json]
version = "1.0.149"

[dependencies.thiserror]
version = "2.0.18"

[dependencies.tiktoken-rs]
version = "0.11.0"

[dependencies.tokio-stream]
version = "0.1.18"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio]
version = "1.52.1"
features = [
    "rt-multi-thread",
    "sync",
    "time",
    "macros",
]

[target.'cfg(target_arch = "wasm32")'.dependencies.getrandom]
version = "=0.2"
features = ["js"]

[target.'cfg(target_arch = "wasm32")'.dependencies.gloo-timers]
version = "0.4.0"
features = ["futures"]

[target.'cfg(target_arch = "wasm32")'.dependencies.tokio]
version = "1.52.1"
features = [
    "sync",
    "macros",
]

[target.'cfg(target_arch = "wasm32")'.dependencies.wasm-bindgen]
version = "0.2"

[target.'cfg(target_arch = "wasm32")'.dependencies.wasm-bindgen-futures]
version = "0.4"
