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
|
|
@ -363,10 +363,10 @@ impl Mind {
|
|||
let mut ag = self.agent.lock().await;
|
||||
match target {
|
||||
StreamTarget::Conversation => {
|
||||
ag.push_message(crate::agent::api::types::Message::user(text));
|
||||
ag.push_message(crate::agent::api::Message::user(text));
|
||||
}
|
||||
StreamTarget::Autonomous => {
|
||||
let mut msg = crate::agent::api::types::Message::user(text);
|
||||
let mut msg = crate::agent::api::Message::user(text);
|
||||
msg.stamp();
|
||||
ag.push_entry(crate::agent::context::ConversationEntry::Dmn(msg));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue