Skip to content

Commit

Permalink
Merge pull request #109 from Arjentix/function-macro
Browse files Browse the repository at this point in the history
Function attribute macro
  • Loading branch information
pepperoni21 authored Jan 12, 2025
2 parents 83e4074 + a2feb97 commit 0a05c93
Show file tree
Hide file tree
Showing 60 changed files with 440 additions and 69 deletions.
65 changes: 43 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 5 additions & 47 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,48 +1,6 @@
[package]
name = "ollama-rs"
version = "0.2.2"
edition = "2021"
license-file = "LICENSE.md"
description = "A Rust library for interacting with the Ollama API"
repository = "https://github.com/pepperoni21/ollama-rs"
readme = "README.md"
[workspace]
resolver = "2"
members = ["ollama-rs", "ollama-rs-macros"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
reqwest = { version = "0.12.5", default-features = false, features = ["json"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tokio = { version = "1", features = ["full"], optional = true }
tokio-stream = { version = "0.1.15", optional = true }
url = "2"
log = "0.4"
scraper = { version = "0.19.0", optional = true }
text-splitter = { version = "0.13.1", optional = true }
regex = { version = "1.9.3", optional = true }
async-stream = "0.3.5"
http = { version = "1.1.0", optional = true }
schemars = { version = "0.8.21", features = ["preserve_order"] }
thiserror = "2.0.9"
calc = { version = "0.4.0", optional = true }
html2md = { version = "0.2.14", optional = true }

[features]
default = ["reqwest/default-tls"]
stream = ["tokio-stream", "reqwest/stream", "tokio"]
rustls = ["reqwest/rustls-tls"]
headers = ["http"]
tool-implementations = ["scraper", "text-splitter", "regex", "calc", "html2md"]

[dev-dependencies]
tokio = { version = "1", features = ["full"] }
ollama-rs = { path = ".", features = [
"stream",
"headers",
"tool-implementations",
] }
base64 = "0.22.0"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[workspace.dependencies]
ollama-rs-macros = { path = "ollama-rs-macros" }
17 changes: 17 additions & 0 deletions ollama-rs-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[package]
name = "ollama-rs-macros"
version = "0.2.2"
edition = "2021"
license-file = "LICENSE.md"
description = "Procedural macros for ollama-rs"
repository = "https://github.com/pepperoni21/ollama-rs"
readme = "README.md"

[lib]
proc-macro = true

[dependencies]
proc-macro2 = "1"
quote = "1"
syn = "2"

Loading

0 comments on commit 0a05c93

Please sign in to comment.