Skip to content

Commit

Permalink
chore: update preset models (#159)
Browse files Browse the repository at this point in the history
* chore: update preset models

* fix: add chat model

* fix: ebturbo pro
  • Loading branch information
danielhjz authored Dec 28, 2023
1 parent 21b2059 commit 7d50cfe
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/qianfan/resources/images/text2image.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ def _supported_models(cls) -> Dict[str, QfLLMInfo]:
"steps",
"sampler_index",
"user_id",
"seed",
"cfg_scale",
"style",
},
),
UNSPECIFIED_MODEL: QfLLMInfo(
Expand Down
14 changes: 14 additions & 0 deletions src/qianfan/resources/llm/chat_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,20 @@ def _supported_models(cls) -> Dict[str, QfLLMInfo]:
"user_id",
},
),
"ERNIE-Bot-turbo-pro": QfLLMInfo(
endpoint="/chat/eb_turbo_pro",
required_keys={"messages"},
optional_keys={
"stream",
"temperature",
"top_p",
"penalty_score",
"user_id",
"tools",
"tool_choice",
"system",
},
),
"ERNIE-Bot-turbo-AI": QfLLMInfo(
endpoint="/chat/ai_apaas",
required_keys={"messages"},
Expand Down
27 changes: 27 additions & 0 deletions src/qianfan/resources/llm/completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,20 @@ def _supported_models(cls) -> Dict[str, QfLLMInfo]:
"user_id",
},
),
"ERNIE-Bot-turbo-pro": QfLLMInfo(
endpoint="/chat/eb_turbo_pro",
required_keys={"messages"},
optional_keys={
"stream",
"temperature",
"top_p",
"penalty_score",
"user_id",
"tools",
"tool_choice",
"system",
},
),
"EB-turbo-AppBuilder": QfLLMInfo(
endpoint="/chat/ai_apaas",
required_keys={"messages"},
Expand Down Expand Up @@ -291,6 +305,19 @@ def _supported_models(cls) -> Dict[str, QfLLMInfo]:
"stop",
},
),
"Yi-34B-Chat": QfLLMInfo(
endpoint="/chat/yi_34b_chat",
required_keys={"messages"},
optional_keys={
"stream",
"user_id",
"temperature",
"top_k",
"top_p",
"penalty_score",
"stop",
},
),
UNSPECIFIED_MODEL: QfLLMInfo(
endpoint="",
required_keys={"prompt"},
Expand Down
5 changes: 5 additions & 0 deletions src/qianfan/resources/llm/embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ def _supported_models(cls) -> Dict[str, QfLLMInfo]:
required_keys={"input"},
optional_keys={"user_id"},
),
"tao-8k": QfLLMInfo(
endpoint="/embeddings/tao_8k",
required_keys={"input"},
optional_keys={"user_id"},
),
UNSPECIFIED_MODEL: QfLLMInfo(
endpoint="", required_keys={"input"}, optional_keys=set()
),
Expand Down

0 comments on commit 7d50cfe

Please sign in to comment.