Restrict API types visibility — types module is now private
Only Message, Role, MessageContent, ContentPart, ToolCall, FunctionCall, Usage, ImageUrl are pub-exported from agent::api. Internal types (ChatRequest, ChatCompletionChunk, ChunkChoice, Delta, ReasoningConfig, ToolCallDelta, FunctionCallDelta) are pub(crate) — invisible outside the crate. All callers updated to import from agent::api:: instead of agent::api::types::. Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
25f4cfabbb
commit
f33b1767da
10 changed files with 17 additions and 16 deletions
|
|
@ -433,7 +433,7 @@ impl Subconscious {
|
|||
let rendered = store_guard.as_ref()
|
||||
.and_then(|s| crate::cli::node::render_node(s, key));
|
||||
if let Some(rendered) = rendered {
|
||||
let mut msg = crate::agent::api::types::Message::user(format!(
|
||||
let mut msg = crate::agent::api::Message::user(format!(
|
||||
"<system-reminder>\n--- {} (surfaced) ---\n{}\n</system-reminder>",
|
||||
key, rendered,
|
||||
));
|
||||
|
|
@ -447,7 +447,7 @@ impl Subconscious {
|
|||
|
||||
if let Some(reflection) = outputs.get("reflection") {
|
||||
if !reflection.trim().is_empty() {
|
||||
ag.push_message(crate::agent::api::types::Message::user(format!(
|
||||
ag.push_message(crate::agent::api::Message::user(format!(
|
||||
"<system-reminder>\n--- subconscious reflection ---\n{}\n</system-reminder>",
|
||||
reflection.trim(),
|
||||
)));
|
||||
|
|
@ -457,7 +457,7 @@ impl Subconscious {
|
|||
if let Some(nudge) = outputs.get("thalamus") {
|
||||
let nudge = nudge.trim();
|
||||
if !nudge.is_empty() && nudge != "ok" {
|
||||
ag.push_message(crate::agent::api::types::Message::user(format!(
|
||||
ag.push_message(crate::agent::api::Message::user(format!(
|
||||
"<system-reminder>\n--- thalamus ---\n{}\n</system-reminder>",
|
||||
nudge,
|
||||
)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue