-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No logs? Can't easily debug max token length exceeded error. #49
Comments
@that1guy Have you checked |
Thanks for reporting an issue. Currently, if known error occurs, the error message is responded to Assist without logging. In the next release ( I will also add logging of OpenAI API call in the next release. |
Yes, checked. Nothing of value in here. |
Excellent. Great new @jekalmin |
Fixed in 0.0.9-beta3 |
Released in |
Am I right this is the same issue? Asking for lights that are ON. Looks like I have to many lights. Using turbo-1106 version and latest 0.0.10 from yesterday. I assume about 30 lights get reported. any help welcome. Something went wrong: failed to parse arguments |
I changed to 3.5-16k model and now it runs fine. Anyhow I want to start a discussion if we are able to change the json to make it more token effective. Repeating "light", switch-on and all of these just increases the json. If we organize light on level one, switch state on level 2 and the just iterate on the items this is much smaller. For sure these needs changes on the loops running through the items. I would assume don't change the existing and just make a conversion of the json would me most effective. Is this possible with ChatGPT or do we have to stay with the formatting and accept the amounts of token. |
Yes. Since it is fixed, it resulted in the error message you wrote.
I'm thinking of changing model from
Can you try changing Functions - spec:
name: execute_services
description: Execute service of devices in Home Assistant.
parameters:
type: object
properties:
list:
type: array
items:
type: object
properties:
domain:
type: string
description: The domain of the service.
service:
type: string
description: The service to be called
service_data:
type: object
description: The service data object to indicate what to control.
properties:
entity_id:
type: array
items:
type: string
description: The entity_id retrieved from available devices. It must start with domain, followed by dot character.
required:
- entity_id
required:
- domain
- service
- service_data
function:
type: native
name: execute_service Response {
"finish_reason": "function_call",
"index": 0,
"message": {
"content": null,
"function_call": {
"arguments": "{\"list\":[{\"domain\":\"switch\",\"service\":\"turn_on\",\"service_data\":{\"entity_id\":[\"switch.bedroom_left\",\"switch.bedroom_center\",\"switch.livingroom_l2\",\"switch.officeroom_top\"]}}]}",
"name": "execute_services"
},
"role": "assistant"
}
} |
Does this clear message help you to understand? Used 3.5-turbo Sorry, I had a problem talking to OpenAI: This model's maximum context length is 4097 tokens. However, you requested 4169 tokens (3959 in the messages, 60 in the functions, and 150 in the completion). Please reduce the length of the messages, functions, or completion. Doing the same request with the gpt-3.5- turbo-1106 does work. It does not report an error and seems to execute the command in the right way. Question: which lights in the living room are on? |
It seems you have exposed too many entities, so it exceeds limit of context windows. Try not to expose all entities, but to expose entities that are necessary. |
Thanks. I know about the costs. Reduced from 190 to 140 entities. Maybe in the future it may help just to call the items in the domain and not all of them. But this require most likely two calls. One to understand what to filter and the the second call with all the objects relevant. For sure a very interesting space to work on. Anyhow the array is already an improvement. |
@stefanbode See https://github.com/jekalmin/extended_openai_conversation/tree/main/examples/function/area |
Closing the issue. |
Opening this back up for further instruction. I've enabled logging per the documentation but I still can't see logs when I go to Setting -> System -> Logs. I do however see logs when I tail My configuration.yaml:
|
I can confirm the same issue that FutureProofHomes has. Cannot see any logs in system/logs but do see info in the home-assistant.log file small update: I do see errors in home assistant core after I got a technical error This error originated from a custom integration. token length( |
Thanks for reporting an issue, @FutureProofHomes , @marnixt ! Did you click |
Thanks, this the missing piece
Op ma 11 mrt 2024 16:13 schreef Min Jekal ***@***.***>:
… Thanks for reporting an issue, @FutureProofHomes
<https://github.com/FutureProofHomes> , @marnixt
<https://github.com/marnixt> !
Did you click LOAD FULL LOGS button?
1.png (view on web)
<https://github.com/jekalmin/extended_openai_conversation/assets/2917984/f4473be3-f9f5-4b89-a8ef-a9333ce2b6cc>
—
Reply to this email directly, view it on GitHub
<#49 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQUREID76I3G3C2KPD2B3TYXXCZXAVCNFSM6AAAAABASSX3KOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBYGY3TQMRRHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@jekalmin when I click "Load Full Logs" I don't see any extra helpful data and the sheer amount of logs loaded can cause the browser to crash. Ideally we could enable debug logs and filter (top right hand corner) to only see extended openai conversation logs. My goal is to see the JSON payload extended openai is POSTing to my LLM server. Hope this feedback is helpful. Appreciate you! |
Thanks @FutureProofHomes as always! I'm quite not sure if debug logs can be visible on the top part and apply filter. |
Where do I look to find logs?
I have enabled logging in my configuration.yaml file as documented here, but i don't see any logs in HA's Setting -> System -> Logs .
I am intermittently receiving the following error, and it's hard to debug without logs.
Amazing integration!
The text was updated successfully, but these errors were encountered: