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

FastChat api model #198

Merged
merged 18 commits into from
Sep 25, 2023
Merged

FastChat api model #198

merged 18 commits into from
Sep 25, 2023

Conversation

bsabri
Copy link
Contributor

@bsabri bsabri commented Sep 4, 2023

No description provided.

bsabri added 2 commits August 31, 2023 14:36
…s implementation ENGINE_NAME=jais-13b-chat selectes the model among the loaded ones and AZURE_API_URL='http://10.4.64.46:5004/v10' defines the API base. It can be tested with curl http://10.4.64.46:5004/v1/models
@bsabri bsabri requested a review from fdalvi September 4, 2023 07:22
@bsabri bsabri changed the title feat/fastchat api model FastChat api model Sep 5, 2023
@fdalvi
Copy link
Collaborator

fdalvi commented Sep 10, 2023

Apologies for not getting to this sooner, but I was in the middle of some refactoring that might make things easier here; Since its really just using the OpenAI (previously GPTChatCompletionModel in our case), shall we just inherit from it? Something like:

class FastChatModel(OpenAIModel):
    def __init__(api_base, api_key, model_name, **kwargs):
        api_base = api_base or os.getenv("FASTCHAT_API_URL")
        ... # something similar for api_key and model_name
        # checks for valid config settings)
        super(FastChatModel, self).__init__(api_base=api_base, api_key=api_key, model_name=model_name, **kwargs)

should do the trick without much re-implementation, what do you think? We can also do it just for ChatCompletion and not the old legacy string-based way. Let me know, we can discuss in person if you like!

@bsabri
Copy link
Contributor Author

bsabri commented Sep 11, 2023

This sounds good! Thanks! I will update the model based on the new refactoring. I'll get back to you if needed.

@bsabri
Copy link
Contributor Author

bsabri commented Sep 17, 2023

environment variables:
OPENAI_API_BASE= "http://10.4.64.46:5004/v1"
OPENAI_API_KEY="EMPTY"
OPENAI_MODEL= "jais-13b-chat"

@fdalvi fdalvi merged commit 17c904e into main Sep 25, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants