Closed Shulyaka closed 1 week ago
Hey there @balloob, mind taking a look at this pull request as it has been labeled with an integration (openai_conversation
) you are listed as a code owner for? Thanks!
@Shulyaka There seems to be an issue when converting the parameters with voluptuous_openapi
if the intent does not have any parameters. OpenAI seems to expected properties
to be present no matter what in the tool spec parameters (at least for GPT 3.5 turbo).
I added this to _format_tool
to get it to work:
if "properties" not in tool_spec["parameters"]:
tool_spec["parameters"]["properties"] = {}
but I think this may be better suited for voluptuous_openapi
. What do you think?
@Shulyaka There seems to be an issue when converting the parameters with
voluptuous_openapi
if the intent does not have any parameters. OpenAI seems to expectedproperties
to be present no matter what in the tool spec parameters (at least for GPT 3.5 turbo).I added this to
_format_tool
to get it to work:if "properties" not in tool_spec["parameters"]: tool_spec["parameters"]["properties"] = {}
but I think this may be better suited for
voluptuous_openapi
. What do you think?
Yes, you are right, I will make the fix.
Breaking change
Proposed change
Implement LLM Tools feature (https://github.com/home-assistant/core/pull/115464) for
openai_conversation
.Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: