Skip to content

Commit

Permalink
document response fields (microsoft#1199)
Browse files Browse the repository at this point in the history
  • Loading branch information
sonichi authored Aug 28, 2023
1 parent 7d6d1d2 commit 80182d1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion flaml/autogen/oai/completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,11 @@ def yes_or_no_filter(context, config, response):
Also, the "prompt" or "messages" parameter can contain a template (str or Callable) which will be instantiated with the context.
Returns:
Responses from OpenAI API.
Responses from OpenAI API, with additional fields.
- `cost`: the total cost.
When `config_list` is provided, the response will contain a few more fields:
- `config_id`: the index of the config in the config_list that is used to generate the response.
- `pass_filter`: whether the response passes the filter function. None if no filter is provided.
"""
if ERROR:
raise ERROR
Expand Down

0 comments on commit 80182d1

Please sign in to comment.