Merge pull request #666 from caseymcc/register_model

Allow models to be registered with litellm
This commit is contained in:
paul-gauthier 2024-06-11 13:20:02 -07:00 committed by GitHub
commit 2f6e360188
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 78 additions and 0 deletions

View file

@ -141,6 +141,23 @@ def get_parser(default_config_files, git_root):
env_var="OPENAI_ORGANIZATION_ID",
help="Specify the OpenAI organization ID",
)
group.add_argument(
"--model-file",
metavar="MODEL_FILE",
default=None,
help={
"Specify a file with model definitions (info and cost) to be registered with litellm, json formated",
" {"
" \"gpt-4\": {",
" \"max_tokens\": 8192,",
" \"input_cost_per_token\": 0.00003,",
" \"output_cost_per_token\": 0.00006,",
" \"litellm_provider\": \"openai\",",
" \"mode\": \"chat\"",
" },",
" }"
}
)
group.add_argument(
"--edit-format",
metavar="EDIT_FORMAT",