k8sgpt
k8sgpt copied to clipboard
feat: add huggingface provider
Closes #828
📑 Description
added huggingface provider. for HF package, i use https://github.com/hupe1980/go-huggingface. i think this is more fit for k8sgpt code than this. Let me know if you think differently
✅ Checks
- [x] My pull request adheres to the code style of this project
- [x] My code requires changes to the documentation
- [x] I have updated the documentation as required
- [x] All the tests have passed
ℹ Additional Information
Also, HF api request requires maxtokens
less than or equal to 500. but k8sgpts default maxtokens is 2048 so users will get below output if they don't update or set
maxtokens`.
How do you think setting huggingfaces default
maxtokens to 500 if it is set k8sgpt
s default 2048?
> ./bin/k8sgpt analyze -f Service -e
0% | | (0/8, 0 it/hr) [0s:0s]
Error: failed while calling AI provider huggingface: huggingfaces error: {"error":["Error in `parameters.max_length`: ensure this value is less than or equal to 500"]}