You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Call openai api only once for analysis and do not call it again and again while pushing duplicate logs in slack.
Actual behaviour
As per my understating, it seems that when multiple logs for the same error are being pushed in the pod, the OpenAI API is being called again to fetch the output. If this is correct, it may not be cost-effective.
I might be wrong. Can someone confirm
Additional Information
No response
The text was updated successfully, but these errors were encountered:
The Operator does not have a client for OpenAI, that would come from the K8sGPT deployment.
Can you show us your K8sGPT custom resource? --no-cache mode will have this behaviour.
I’ve noticed that K8sGPT generates the same logs multiple times to the sink. For example, if there’s a POD with an OOM issue, it was pushing the same logs repeatedly to the slack. Before each log is sent, does K8sGPT maintain a cache, or does it call the OpenAI API every time before sending the message?
I’m not very experienced with networking, but I tried using Kubeshark and observed that before sending logs to Slack, it performs a DNS check for OpenAI. This made me think it could be calling openai multiple times. I could be wrong, though. I'd appreciate your thoughts on this.
Checklist
Affected Components
K8sGPT Version
v0.0.26
Kubernetes Version
v1.29.8
Host OS and its Version
No response
Steps to reproduce
Host the operator after following steps written here
https://github.com/k8sgpt-ai/k8sgpt-operator
Expected behaviour
Call openai api only once for analysis and do not call it again and again while pushing duplicate logs in slack.
Actual behaviour
As per my understating, it seems that when multiple logs for the same error are being pushed in the pod, the OpenAI API is being called again to fetch the output. If this is correct, it may not be cost-effective.
I might be wrong. Can someone confirm
Additional Information
No response
The text was updated successfully, but these errors were encountered: