finally make token counting work in apps
This commit is contained in:
@@ -87,7 +87,6 @@ def chat_completions() -> Response:
|
||||
tool_choice=tool_choice,
|
||||
parallel_tool_calls=parallel_tool_calls,
|
||||
reasoning_param=reasoning_param,
|
||||
include_usage=(not is_stream) or include_usage,
|
||||
)
|
||||
if error_resp is not None:
|
||||
return error_resp
|
||||
@@ -256,7 +255,6 @@ def completions() -> Response:
|
||||
input_items,
|
||||
instructions=BASE_INSTRUCTIONS,
|
||||
reasoning_param=reasoning_param,
|
||||
include_usage=(not stream_req) or include_usage,
|
||||
)
|
||||
if error_resp is not None:
|
||||
return error_resp
|
||||
|
||||
@@ -40,7 +40,6 @@ def start_upstream_request(
|
||||
tool_choice: Any | None = None,
|
||||
parallel_tool_calls: bool = False,
|
||||
reasoning_param: Dict[str, Any] | None = None,
|
||||
include_usage: bool | None = None,
|
||||
):
|
||||
access_token, account_id = get_effective_chatgpt_auth()
|
||||
if not access_token or not account_id:
|
||||
|
||||
Reference in New Issue
Block a user