[package]
edition = "2021"
name = "ambi"
version = "0.3.8"
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"]
dynamic-link = [
"llama-cpp",
"llama-cpp-2/dynamic-link",
"llama-cpp-sys-2/dynamic-link",
]
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 = "crate_agent_in_macro"
path = "examples/crate_agent_in_macro.rs"
required-features = [
"openai-api",
"macro",
]
[[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"
optional = true
[dependencies.anyhow]
version = "1.0.102"
[dependencies.anymap2]
version = "0.13.0"
[dependencies.async-openai]
version = "0.38.0"
features = ["chat-completion"]
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.146"
optional = true
[dependencies.llama-cpp-sys-2]
version = "0.1.146"
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.js-sys]
version = "0.3"
[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"
[target.'cfg(target_arch = "wasm32")'.dependencies.web-sys]
version = "0.3"
features = [
"ReadableStream",
"ReadableStreamDefaultReader",
"Request",
"RequestInit",
"Response",
"Window",
"Headers",
]
[profile.dev]
codegen-units = 16
debug = 1
[profile.dev.package.llama-cpp-sys-2]
opt-level = 3
[profile.dev.package."*"]
opt-level = 2