Skip to content

Commit

Permalink
merge conflict resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
tssweeney committed Aug 26, 2024
2 parents a4ede9c + a72f7de commit 516a827
Show file tree
Hide file tree
Showing 188 changed files with 2,088 additions and 810 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cla.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ jobs:
# branch should not be protected
branch: 'cla'
# cannot use teams due to: https://github.com/contributor-assistant/github-action/issues/100
allowlist: actions-user, altay, dannygoldstein, davidwallacejackson, jamie-rasmussen, jlzhao27, jo-fang, jwlee64, laxels, morganmcg1, nickpenaranda, scottire, shawnlewis, staceysv, tssweeney, vanpelt, vwrj, wandbmachine
allowlist: actions-user, altay, bdytx5, dannygoldstein, davidwallacejackson, jamie-rasmussen, jlzhao27, jo-fang, jwlee64, laxels, morganmcg1, nickpenaranda, scottire, shawnlewis, staceysv, tssweeney, vanpelt, vwrj, wandbmachine
1 change: 1 addition & 0 deletions docs/docs/guides/cookbooks/summarization/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

34 changes: 34 additions & 0 deletions docs/docs/guides/tracking/feedback.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,40 @@ call.feedback.add_note("this is a note")
call.feedback.add("correctness", { "value": 5 })
```

### Retrieving the Call UUID

For scenarios where you need to add feedback immediately after a call, you can retrieve the call UUID programmatically during or after the call execution. Here is how to get the UUID of the call from within the operation:

```python

import weave
weave.init("uuid")

@weave.op()
def simple_operation(input_value):
# Perform some simple operation
output = f"Processed {input_value}"
# Get the current call ID
current_call = weave.get_current_call()
call_id = current_call.id
return output, call_id
```

Additionally, you can use call() method to execute the operation and retrieve the call ID after execution of the function:

```python
import weave
weave.init("uuid")

@weave.op()
def simple_operation(input_value):
return f"Processed {input_value}"

# Execute the operation and retrieve the result and call ID
result, call = simple_operation.call("example input")
call_id = call.id
```

### Querying feedback on a call

```python
Expand Down
Loading

0 comments on commit 516a827

Please sign in to comment.