pub struct Llm {
pub proc: Option<Arc<DaggerSessionProc>>,
pub selection: Selection,
pub graphql_client: DynGraphQLClient,
}
Fields§
§proc: Option<Arc<DaggerSessionProc>>
§selection: Selection
§graphql_client: DynGraphQLClient
Implementations§
Source§impl Llm
impl Llm
Sourcepub fn bind_result(&self, name: impl Into<String>) -> Binding
pub fn bind_result(&self, name: impl Into<String>) -> Binding
returns the type of the current state
Sourcepub async fn history_json(&self) -> Result<Json, DaggerError>
pub async fn history_json(&self) -> Result<Json, DaggerError>
return the raw llm message history as json
Sourcepub async fn id(&self) -> Result<Llmid, DaggerError>
pub async fn id(&self) -> Result<Llmid, DaggerError>
A unique identifier for this LLM.
Sourcepub async fn last_reply(&self) -> Result<String, DaggerError>
pub async fn last_reply(&self) -> Result<String, DaggerError>
return the last llm reply from the history
Sourcepub async fn model(&self) -> Result<String, DaggerError>
pub async fn model(&self) -> Result<String, DaggerError>
return the model used by the llm
Sourcepub async fn provider(&self) -> Result<String, DaggerError>
pub async fn provider(&self) -> Result<String, DaggerError>
return the provider used by the llm
Sourcepub async fn sync(&self) -> Result<Llmid, DaggerError>
pub async fn sync(&self) -> Result<Llmid, DaggerError>
synchronize LLM state
Sourcepub fn token_usage(&self) -> LlmTokenUsage
pub fn token_usage(&self) -> LlmTokenUsage
returns the token usage of the current state
Sourcepub async fn tools(&self) -> Result<String, DaggerError>
pub async fn tools(&self) -> Result<String, DaggerError>
print documentation for available tools
Sourcepub fn with_env(&self, env: impl IntoID<EnvId>) -> Llm
pub fn with_env(&self, env: impl IntoID<EnvId>) -> Llm
allow the LLM to interact with an environment via MCP
Sourcepub fn with_model(&self, model: impl Into<String>) -> Llm
pub fn with_model(&self, model: impl Into<String>) -> Llm
Sourcepub fn with_prompt(&self, prompt: impl Into<String>) -> Llm
pub fn with_prompt(&self, prompt: impl Into<String>) -> Llm
Sourcepub fn with_prompt_file(&self, file: impl IntoID<FileId>) -> Llm
pub fn with_prompt_file(&self, file: impl IntoID<FileId>) -> Llm
Sourcepub fn with_system_prompt(&self, prompt: impl Into<String>) -> Llm
pub fn with_system_prompt(&self, prompt: impl Into<String>) -> Llm
Sourcepub fn without_default_system_prompt(&self) -> Llm
pub fn without_default_system_prompt(&self) -> Llm
Disable the default system prompt
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Llm
impl !RefUnwindSafe for Llm
impl Send for Llm
impl Sync for Llm
impl Unpin for Llm
impl !UnwindSafe for Llm
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more