mirror of
https://github.com/home-assistant/core.git
synced 2025-11-13 04:50:17 +00:00
Add typing for OpenAI client and fallout (#118514)
* typing for client and consequences * Update homeassistant/components/openai_conversation/conversation.py --------- Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
This commit is contained in:
@@ -184,7 +184,6 @@ async def test_function_call(
|
||||
assert mock_create.mock_calls[1][2]["messages"][3] == {
|
||||
"role": "tool",
|
||||
"tool_call_id": "call_AbCdEfGhIjKlMnOpQrStUvWx",
|
||||
"name": "test_tool",
|
||||
"content": '"Test response"',
|
||||
}
|
||||
mock_tool.async_call.assert_awaited_once_with(
|
||||
@@ -317,7 +316,6 @@ async def test_function_exception(
|
||||
assert mock_create.mock_calls[1][2]["messages"][3] == {
|
||||
"role": "tool",
|
||||
"tool_call_id": "call_AbCdEfGhIjKlMnOpQrStUvWx",
|
||||
"name": "test_tool",
|
||||
"content": '{"error": "HomeAssistantError", "error_text": "Test tool exception"}',
|
||||
}
|
||||
mock_tool.async_call.assert_awaited_once_with(
|
||||
|
||||
Reference in New Issue
Block a user