Skip to content

Commit

Permalink
update cost docs (#2794)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwlee64 authored Oct 28, 2024
1 parent a3e2e44 commit f9a1959
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
4 changes: 0 additions & 4 deletions docs/docs/guides/tracking/costs.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# Costs

:::info
Custom costs are accessible via Python and REST queries. UI uptake is under development and expected to be complete by middle of October 2024
:::

## Adding a custom cost

You can add a custom cost by using the [`add_cost`](/reference/python-sdk/weave/trace/weave.trace.weave_client#method-add_cost) method.
Expand Down
1 change: 1 addition & 0 deletions docs/docs/reference/gen_notebooks/custom_model_cost.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ class YourModel(Model):
"usage": {
"input_tokens": prompt_tokens,
"output_tokens": completion_tokens,
"total_tokens": prompt_tokens + completion_tokens,
},
"model": "your_model_name",
"output": prediction,
Expand Down
2 changes: 1 addition & 1 deletion docs/notebooks/custom_model_cost.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"---\n",
"docusaurus_head_meta::end -->\n",
"\n",

"<!--- @wandbcode{prompt-optim-notebook} -->"
]
},
Expand Down Expand Up @@ -196,6 +195,7 @@
" \"usage\": {\n",
" \"input_tokens\": prompt_tokens,\n",
" \"output_tokens\": completion_tokens,\n",
" \"total_tokens\": prompt_tokens + completion_tokens,\n",
" },\n",
" \"model\": \"your_model_name\",\n",
" \"output\": prediction,\n",
Expand Down

0 comments on commit f9a1959

Please sign in to comment.