-
Notifications
You must be signed in to change notification settings - Fork 136
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
Bug Fix: chat completions API calls need model_id
#114
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Tyler Wilbers <[email protected]>
for more information, see https://pre-commit.ci
lvliang-intel
approved these changes
May 31, 2024
@lvliang-intel Thanks for the review. Should we assign another person for review? |
dcmiddle
reviewed
Jun 17, 2024
dcmiddle
reviewed
Jun 17, 2024
Signed-off-by: Tyler Wilbers <[email protected]>
… tybrs-fix-model-id
Signed-off-by: Tyler Wilbers <[email protected]>
Signed-off-by: Tyler Wilbers <[email protected]>
for more information, see https://pre-commit.ci
@dcmiddle and @lvliang-intel Comments addressed and conflict fixed. Thanks! |
Signed-off-by: Tyler Wilbers <[email protected]>
… tybrs-fix-model-id
dcmiddle
approved these changes
Jun 20, 2024
lvliang-intel
requested review from
chensuyue and
zehao-intel
and removed request for
dcmiddle
June 21, 2024 01:20
zehao-intel
approved these changes
Jun 21, 2024
sharanshirodkar7
pushed a commit
to sharanshirodkar7/GenAIComps
that referenced
this pull request
Jul 9, 2024
* added default model Signed-off-by: Tyler Wilbers <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * added instructions for enviornment variable Signed-off-by: Tyler Wilbers <[email protected]> * added bash to codeblock Signed-off-by: Tyler Wilbers <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixed typo Signed-off-by: Tyler Wilbers <[email protected]> --------- Signed-off-by: Tyler Wilbers <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Signed-off-by: sharanshirodkar7 <[email protected]>
yogeshmpandey
pushed a commit
to yogeshmpandey/GenAIComps
that referenced
this pull request
Jul 10, 2024
* added default model Signed-off-by: Tyler Wilbers <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * added instructions for enviornment variable Signed-off-by: Tyler Wilbers <[email protected]> * added bash to codeblock Signed-off-by: Tyler Wilbers <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixed typo Signed-off-by: Tyler Wilbers <[email protected]> --------- Signed-off-by: Tyler Wilbers <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Signed-off-by: Yogesh Pandey <[email protected]>
dwhitena
pushed a commit
to predictionguard/GenAIComps
that referenced
this pull request
Jul 24, 2024
* added default model Signed-off-by: Tyler Wilbers <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * added instructions for enviornment variable Signed-off-by: Tyler Wilbers <[email protected]> * added bash to codeblock Signed-off-by: Tyler Wilbers <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixed typo Signed-off-by: Tyler Wilbers <[email protected]> --------- Signed-off-by: Tyler Wilbers <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Signed-off-by: Daniel Whitenack <[email protected]>
lkk12014402
pushed a commit
that referenced
this pull request
Aug 8, 2024
Signed-off-by: chensuyue <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Users must pass model parameter explicitly to use /v1/chat/completions API call:
Using
ChatHuggingFace
in langchain this looks like the following:If you do not add a
model_id
it will use the_resolve_model_id
method to get themodel_id
but this does not work for locally deployed TGI services (because it uses huggingface_hublist_inference_endpoints
function which only lists hugging face endpoints for account). This issue can be found here langchain-ai/langchain#17779. Current implementation errors as follows:This PR adds a workaround to this issue by adding a
DEFAULT_MODEL
variable and a way to try to get model id from/info
endpoint. I also moved theChatHuggingFace
to run at start. This should improve latency of API calls by 1-2 seconds.Issues
n/a
.Type of change
List the type of change like below. Please delete options that are not relevant.
Dependencies
langchain-community
Tests