Skip to content

Commit 31357a5

Browse files
committed
fix: correct DurableContext trait signature in concepts.md
The code snippet showed wrap_llm_call/wrap_tool_call with BoxedFuture, but the actual trait uses execute_llm_call/execute_tool with RPITIT and ActivityOptions parameter.
1 parent 48bb866 commit 31357a5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/book/src/getting-started/concepts.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,11 @@ Temporal or Restate.
8484

8585
```rust,ignore
8686
pub trait DurableContext: Send + Sync {
87-
async fn wrap_llm_call(&self, f: BoxedFuture<'_, CompletionResponse>) -> Result<CompletionResponse, DurableError>;
88-
async fn wrap_tool_call(&self, name: &str, f: BoxedFuture<'_, ToolOutput>) -> Result<ToolOutput, DurableError>;
87+
fn execute_llm_call(&self, request: CompletionRequest, options: ActivityOptions)
88+
-> impl Future<Output = Result<CompletionResponse, DurableError>> + Send;
89+
90+
fn execute_tool(&self, tool_name: &str, input: Value, ctx: &ToolContext, options: ActivityOptions)
91+
-> impl Future<Output = Result<ToolOutput, DurableError>> + Send;
8992
}
9093
```
9194

0 commit comments

Comments
 (0)