Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -83,9 +83,12 @@ def prepare_api_params(messages, model_name):
|
|
83 |
}
|
84 |
|
85 |
# Add the appropriate token parameter based on model
|
86 |
-
|
87 |
-
|
|
|
|
|
88 |
else:
|
|
|
89 |
api_params["max_tokens"] = config["max_tokens"]
|
90 |
|
91 |
return api_params, config
|
|
|
83 |
}
|
84 |
|
85 |
# Add the appropriate token parameter based on model
|
86 |
+
param_name = config["param_name"]
|
87 |
+
if param_name == "max_completion_tokens":
|
88 |
+
# Use the max_completion_tokens value from config
|
89 |
+
api_params["max_completion_tokens"] = config["max_completion_tokens"]
|
90 |
else:
|
91 |
+
# Use the max_tokens value for other models
|
92 |
api_params["max_tokens"] = config["max_tokens"]
|
93 |
|
94 |
return api_params, config
|