Skip to content

Commit 89d64c6

Browse files
senamakelmedullabot
andcommitted
refactor: consume focused inference crates
Co-authored-by: Medulla <medulla@tinyhumans.ai>
1 parent 580c6bb commit 89d64c6

190 files changed

Lines changed: 606 additions & 584 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Cargo.lock‎

Lines changed: 30 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎README.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ tinyagents-registry = { git = "https://github.com/tinyhumansai/tinyagents", pack
6161
# The code samples below build `Message` and provider types directly from
6262
# TinyInference, the message/model crate TinyAgents is built on. It is a
6363
# separate git dependency, not re-exported by the crates above.
64-
tinyinference-core = { git = "https://github.com/tinyhumansai/tinyinference", package = "tinyinference-core" }
64+
tinyinference-llm = { git = "https://github.com/tinyhumansai/tinyinference", package = "tinyinference-llm" }
6565
```
6666

6767
A minimal typed graph — a whole-state agent/tool loop (trimmed from
6868
[`examples/basic_graph.rs`](crates/tinyagents-integration-tests/examples/basic_graph.rs)):
6969

7070
```rust
7171
use tinyagents_graph::*;
72-
use tinyinference_core::message::Message;
72+
use tinyinference_llm::message::Message;
7373

7474
#[derive(Clone, Debug)]
7575
struct AgentState {
@@ -113,8 +113,8 @@ A one-shot model call through the harness (`export OPENAI_API_KEY=...` then
113113
```rust
114114
use std::sync::Arc;
115115
use tinyagents_harness::runtime::AgentHarness;
116-
use tinyinference_core::message::Message;
117-
use tinyinference_core::providers::openai::OpenAiModel;
116+
use tinyinference_llm::message::Message;
117+
use tinyinference_llm::providers::openai::OpenAiModel;
118118

119119
let model = OpenAiModel::from_env()?;
120120
let mut harness: AgentHarness<()> = AgentHarness::new();

‎crates/tinyagents-graph/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ sha2 = "0.11"
1919
tinyagents-harness = { path = "../tinyagents-harness", version = "2.1.2", default-features = false }
2020
tinyagents-language = { path = "../tinyagents-language", version = "2.1.2" }
2121
tinyagents-tracing = { path = "../tinyagents-tracing", version = "2.1.2", default-features = false }
22-
tinyinference-core = { path = "../../vendor/tinyinference/crates/tinyinference-core", version = "0.2.1" }
22+
tinyinference-llm = { path = "../../vendor/tinyinference/crates/tinyinference-llm", version = "0.2.1" }
2323
tokio = { version = "1", default-features = false, features = ["sync", "time", "macros", "rt", "rt-multi-thread", "fs"] }
2424

2525
[features]

‎crates/tinyagents-graph/src/goals/test.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ mod tool_tests {
262262
use tinyagents_harness::ids::{RunId, ThreadId};
263263
use tinyagents_harness::store::{InMemoryStore, Store};
264264
use tinyagents_harness::tool::{Tool, ToolExecutionContext};
265-
use tinyinference_core::tool::ToolCall;
265+
use tinyinference_llm::tool::ToolCall;
266266

267267
fn store() -> Arc<dyn Store> {
268268
Arc::new(InMemoryStore::default())

‎crates/tinyagents-graph/src/goals/tool.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use tinyagents_harness::store::Store;
2626
use tinyagents_harness::tool::{
2727
Tool, ToolExecutionContext, ToolPolicy, ToolRegistry, ToolResult, ToolSideEffects,
2828
};
29-
use tinyinference_core::tool::{ToolCall, ToolSchema};
29+
use tinyinference_llm::tool::{ToolCall, ToolSchema};
3030

3131
/// Which thread-goal control a [`GoalTool`] implements.
3232
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]

‎crates/tinyagents-graph/src/orchestration/test.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use tinyagents_harness::cancel::CancellationToken;
77
use tinyagents_harness::ids::TaskId;
88
use tinyagents_harness::steering::SteeringHandle;
99
use tinyagents_harness::tool::{Tool, ToolRegistry};
10-
use tinyinference_core::tool::ToolCall;
10+
use tinyinference_llm::tool::ToolCall;
1111

1212
fn graph_spec(id: &str) -> OrchestrationTaskSpec {
1313
OrchestrationTaskSpec::new(

‎crates/tinyagents-graph/src/orchestration/tool.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ use crate::{Result, TinyAgentsError};
1010
use tinyagents_harness::ids::{GraphId, TaskId, new_call_id, next_seq};
1111
use tinyagents_harness::steering::{SteeringCommand, SteeringHandle};
1212
use tinyagents_harness::tool::{Tool, ToolRegistry, ToolResult};
13-
use tinyinference_core::message::Message;
14-
use tinyinference_core::tool::{ToolCall, ToolSchema};
13+
use tinyinference_llm::message::Message;
14+
use tinyinference_llm::tool::{ToolCall, ToolSchema};
1515

1616
use super::store::{TaskStore, orchestration_not_found};
1717
use super::types::*;

‎crates/tinyagents-graph/src/recursion/types.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ pub struct ChildRun {
200200
/// folds the delegated harness agent's [`UsageTotals`] here so it is visible
201201
/// on the parent [`GraphExecution`](crate::GraphExecution) rollup.
202202
#[serde(default)]
203-
pub usage: tinyinference_core::usage::UsageTotals,
203+
pub usage: tinyinference_llm::usage::UsageTotals,
204204
}
205205

206206
/// A thread-safe collector the executor hands to node contexts so that a

‎crates/tinyagents-graph/src/subagent_node/test.rs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ use crate::builder::GraphBuilder;
1919
use tinyagents_harness::runtime::AgentHarness;
2020
use tinyagents_harness::subagent::SubAgent;
2121
use tinyagents_harness::testkit::{EventRecorder, FakeTool, ScriptedModel};
22-
use tinyinference_core::message::AssistantMessage;
23-
use tinyinference_core::model::ModelResponse;
24-
use tinyinference_core::providers::MockModel;
25-
use tinyinference_core::tool::ToolCall;
26-
use tinyinference_core::usage::Usage;
22+
use tinyinference_llm::message::AssistantMessage;
23+
use tinyinference_llm::model::ModelResponse;
24+
use tinyinference_llm::providers::MockModel;
25+
use tinyinference_llm::tool::ToolCall;
26+
use tinyinference_llm::usage::Usage;
2727

2828
#[derive(Default)]
2929
struct TestAgentRegistry {

‎crates/tinyagents-graph/src/subagent_node/types.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use serde_json::Value;
1818
use crate::Result;
1919
use tinyagents_harness::events::EventSink;
2020
use tinyagents_harness::retry::RetryPolicy;
21-
use tinyinference_core::usage::UsageTotals;
21+
use tinyinference_llm::usage::UsageTotals;
2222

2323
/// A harness agent invocable by name from a graph node.
2424
///

0 commit comments

Comments
 (0)