Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 33 additions & 4 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ thiserror = "2"
# published; embedding hosts may patch this exact git source so the host and
# TinyCortex share one `EmbeddingModel` trait identity without pulling in an
# agent runtime.
tinyinference = { git = "https://github.com/tinyhumansai/tinyinference", rev = "cc8aca484bb995fbab3b7358f0d72ab5056b587c" }
tinyinference-embeddings = { git = "https://github.com/tinyhumansai/tinyinference", rev = "bb0f820" }
tinyinference-llm = { git = "https://github.com/tinyhumansai/tinyinference", rev = "bb0f820" }
# The stable contract crate (value types, error enum, `Memory` trait). Declared
# as a path dependency, not a registry requirement, so embedding hosts resolve
# it through this checkout without needing their own `[patch.crates-io]` entry.
Expand Down
8 changes: 4 additions & 4 deletions examples/persona_agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//!
//! 1. [`PersonaRetriever`] ranks persisted observations with deterministic,
//! network-free BM25 retrieval weighted by evidence tier.
//! 2. A provider-neutral [`tinyinference`] model receives only those ranked
//! 2. A provider-neutral [`tinyinference-llm`] model receives only those ranked
//! observations and the person's explicit directives, then writes one
//! evidence-cited decision.
//!
Expand All @@ -25,9 +25,9 @@
//! - `TINYCORTEX_LLM_MODEL` — model id (default `deepseek/deepseek-v4-flash`).
//! - `PERSONA_IDENTITY` — identity label in the prompt (default `this developer`).

use tinyinference::message::Message;
use tinyinference::model::{ChatModel, ModelRequest};
use tinyinference::providers::openai::OpenAiModel;
use tinyinference_llm::message::Message;
use tinyinference_llm::model::{ChatModel, ModelRequest};
use tinyinference_llm::providers::openai::OpenAiModel;

use tinycortex::memory::config::MemoryConfig;
use tinycortex::memory::persona::compile::read_directives;
Expand Down
4 changes: 2 additions & 2 deletions src/memory/chunks/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
///
/// Delegates to the same formatter the namespace store's embedding providers
/// use ([`crate::memory::store::vectors::format_embedding_signature`], itself a
/// re-export from `tinyinference`), so the two stores cannot drift into
/// re-export from `tinyinference-embeddings`), so the two stores cannot drift into
/// byte-different spellings of the same space again.
pub fn format_signature(provider: &str, model: &str, dims: usize) -> String {
tinyinference::embeddings::format_embedding_signature(provider, model, dims)
tinyinference_embeddings::format_embedding_signature(provider, model, dims)
}

/// A signature decomposed into the parts that identify its vector space.
Expand Down
2 changes: 1 addition & 1 deletion src/memory/health.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ pub fn classify_embed_error_str(msg: &str) -> PipelineFailure {

// #5354 — the local Ollama runtime is not usable: the daemon is not
// listening, or the configured embedding model was never pulled. Both are
// emitted by `tinyinference::embeddings::ollama` with the fix already
// emitted by `tinyinference_embeddings::ollama` with the fix already
// in the text:
//
// "ollama embed request failed (is Ollama running at <base>?): …"
Expand Down
2 changes: 1 addition & 1 deletion src/memory/health_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ fn classify_transport_error_is_transient() {
}

/// #5354 — the Ollama daemon is not listening. Verbatim wording from
/// `tinyinference::embeddings::OllamaEmbeddingModel` request path.
/// `tinyinference_embeddings::OllamaEmbeddingModel` request path.
/// Note the parenthesised hint: `parse_http_status` reads the first `(`, so
/// without an explicit match this fell through to `Transient` and the panel
/// told the user to wait for a retry that can never start their daemon.
Expand Down
14 changes: 7 additions & 7 deletions src/memory/store/vectors/embedding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use async_trait::async_trait;
/// instantiated backend. Drift between the two would silently split one
/// embedding space into two.
pub fn format_embedding_signature(name: &str, model_id: &str, dims: usize) -> String {
tinyinference::embeddings::format_embedding_signature(name, model_id, dims)
tinyinference_embeddings::format_embedding_signature(name, model_id, dims)
}

/// Interface for embedding backends that convert text into numerical vectors.
Expand Down Expand Up @@ -63,30 +63,30 @@ pub trait EmbeddingBackend: Send + Sync {
#[async_trait]
impl<T> EmbeddingBackend for T
where
T: tinyinference::embeddings::EmbeddingModel + ?Sized,
T: tinyinference_embeddings::EmbeddingModel + ?Sized,
{
fn name(&self) -> &str {
tinyinference::embeddings::EmbeddingModel::name(self)
tinyinference_embeddings::EmbeddingModel::name(self)
}

fn model_id(&self) -> &str {
tinyinference::embeddings::EmbeddingModel::model_id(self)
tinyinference_embeddings::EmbeddingModel::model_id(self)
}

fn dimensions(&self) -> usize {
tinyinference::embeddings::EmbeddingModel::dimensions(self)
tinyinference_embeddings::EmbeddingModel::dimensions(self)
}

fn signature(&self) -> String {
tinyinference::embeddings::EmbeddingModel::signature(self)
tinyinference_embeddings::EmbeddingModel::signature(self)
}

async fn embed(&self, texts: &[&str]) -> anyhow::Result<Vec<Vec<f32>>> {
let owned = texts
.iter()
.map(|text| (*text).to_owned())
.collect::<Vec<_>>();
tinyinference::embeddings::EmbeddingModel::embed(self, &owned)
tinyinference_embeddings::EmbeddingModel::embed(self, &owned)
.await
.map_err(|error| anyhow::anyhow!(error))
}
Expand Down
Loading