Skip to content

Commit

Permalink
[upstage integration] set default context size (#14293)
Browse files Browse the repository at this point in the history
* fix: alias upsage_api_key to api_key

* chore: update package version

* fix: set default context size to 32768

* chore: update upstage llm package version
  • Loading branch information
JuHyung-Son committed Jun 22, 2024
1 parent b517486 commit 83e0d07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from llama_index.core.base.llms.generic_utils import get_from_param_or_env

DEFAULT_UPSTAGE_API_BASE = "https://api.upstage.ai/v1/solar"
DEFAULT_CONTEXT_WINDOW = 32768
CHAT_MODELS = {
"solar-1-mini-chat": 32768,
}
Expand Down Expand Up @@ -44,7 +45,5 @@ def is_function_calling_model(model: str) -> bool:

def upstage_modelname_to_contextsize(modelname: str) -> int:
if modelname not in ALL_AVAILABLE_MODELS:
raise ValueError(
f"Unknown model: {modelname}. Please provide a valid Upstage model name in: {', '.join(ALL_AVAILABLE_MODELS.keys())}"
)
return DEFAULT_CONTEXT_WINDOW
return CHAT_MODELS[modelname]
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ license = "MIT"
name = "llama-index-llms-upstage"
packages = [{include = "llama_index/"}]
readme = "README.md"
version = "0.1.1"
version = "0.1.2"

[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
Expand Down

0 comments on commit 83e0d07

Please sign in to comment.