-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from helm.clients.openai_client import OpenAIClient | ||
from helm.common.cache import CacheConfig | ||
from helm.tokenizers.tokenizer import Tokenizer | ||
|
||
|
||
class UpstageChatClient(OpenAIClient): | ||
"""Sends request to a Upstage model using a OpenAI-compatible Chat API.""" | ||
|
||
def __init__( | ||
self, | ||
tokenizer: Tokenizer, | ||
tokenizer_name: str, | ||
cache_config: CacheConfig, | ||
api_key: str, | ||
): | ||
super().__init__( | ||
tokenizer=tokenizer, | ||
tokenizer_name=tokenizer_name, | ||
cache_config=cache_config, | ||
api_key=api_key, | ||
org_id=None, | ||
base_url="https://api.upstage.ai/v1/solar", | ||
) |
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
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