mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
(sap) fix after bot review
This commit is contained in:
parent
315f1755e8
commit
6123651b30
3 changed files with 9 additions and 4 deletions
|
|
@ -266,7 +266,8 @@ class GenAIHubOrchestrationConfig(OpenAIGPTConfig):
|
|||
stream_config = {}
|
||||
if "stream_options" in optional_params:
|
||||
stream_options = optional_params.pop("stream_options", {})
|
||||
stream_config["chunk_size"] = stream_options.get("chunk_size", 100)
|
||||
if "chunk_size" in stream_options:
|
||||
stream_config["chunk_size"] = stream_options.get("chunk_size")
|
||||
if "delimiters" in stream_options:
|
||||
stream_config["delimiters"] = stream_options.get("delimiters")
|
||||
|
||||
|
|
|
|||
|
|
@ -167,7 +167,8 @@ class GenAIHubEmbeddingConfig(BaseEmbeddingConfig):
|
|||
input_dict = {"text": input}
|
||||
if optional_params.get("type"):
|
||||
input_dict["type"] = optional_params.get("type")
|
||||
masking = {"masking": optional_params.get("masking")} if optional_params.get("masking") else {}
|
||||
masking = optional_params.get("masking")
|
||||
masking = {"masking": masking} if masking is not None else {}
|
||||
body = {
|
||||
"config": {
|
||||
"modules": {
|
||||
|
|
|
|||
|
|
@ -426,9 +426,12 @@ class TestSAPTransformationIntegration:
|
|||
headers={}
|
||||
)
|
||||
assert "translation" not in config["config"]["modules"][0]
|
||||
assert config["config"]["modules"][1]["translation"] == translation_config
|
||||
translation = config["config"]["modules"][1]["translation"]
|
||||
assert translation["input"]["config"]["source_language"] == "en-US"
|
||||
assert translation["input"]["config"]["target_language"] == "de-DE"
|
||||
assert translation["output"]["config"]["target_language"] == "fr-FR"
|
||||
assert config["config"]["modules"][1]["prompt_templating"]["model"]["name"] == "gpt-5"
|
||||
assert config["config"]["modules"][0]["prompt_templating"]["model"]["name"] == "gpt-4o"
|
||||
assert config["config"]["modules"][0]["prompt_templating"]["model"]["params"] == {}
|
||||
assert config["config"]["modules"][1]["prompt_templating"]["prompt"]["template"][0]["content"] == "Hello world!"
|
||||
assert config["config"]["modules"][0]["prompt_templating"]["prompt"]["template"][0]["content"] == "Hello."
|
||||
assert config["config"]["modules"][0]["prompt_templating"]["prompt"]["template"][0]["content"] == "Hello."
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue