langchain4j / langchain4j

Java version of LangChain
https://docs.langchain4j.dev
Apache License 2.0
4.91k stars 978 forks source link

[BUG] `GitHub Enterprise Cloud` is not supported #2129

Open hemeroc opened 6 days ago

hemeroc commented 6 days ago

Describe the bug Most likely GitHub Cloud and GitHub Enterprise Cloud need to be treated differently.

Log and Stack trace

Status code 401,"{"error":{"code":"unauthorized","message":"Your account type is not currently supported","details":"Your account type is not currently supported"}}"

The exact same granular token scope for my other account works fine.

Expected behavior The GitHub Model does also work for GitHub Enterprise Cloud users.

Please complete the following information:

Additional context Just to link a bug in a project which is using langchain4j: https://github.com/Blarc/ai-commits-intellij-plugin/issues/286

langchain4j commented 4 days ago

cc @jdubois @agoncal

jdubois commented 5 hours ago

I don't think there's a specific authentication mechanism for GitHub Enterprise Cloud, could you check at https://docs.github.com/en/enterprise-cloud@latest/github-models/prototyping-with-ai-models if you can access them directly, without using LangChain4j ?