Skip to content
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

feat: add huggingface provider #893

Merged
merged 3 commits into from
Jan 28, 2024
Merged

Conversation

JuHyung-Son
Copy link
Contributor

@JuHyung-Son JuHyung-Son commented Jan 25, 2024

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

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • 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 k8sgpts 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"]}

Signed-off-by: JuHyung-Son <sonju0427@gmail.com>
Signed-off-by: JuHyung-Son <sonju0427@gmail.com>
@JuHyung-Son JuHyung-Son requested review from a team as code owners January 25, 2024 11:17
@JuHyung-Son JuHyung-Son changed the title add huggingface provider feat: add huggingface provider Jan 25, 2024
pkg/ai/huggingface.go Outdated Show resolved Hide resolved
…nter

Signed-off-by: JuHyung-Son <sonju0427@gmail.com>
@AlexsJones AlexsJones merged commit 2fd476e into k8sgpt-ai:main Jan 28, 2024
7 checks passed
@JuHyung-Son JuHyung-Son deleted the issue-828 branch January 29, 2024 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Feature]: backend support for Hugging Face
2 participants