Skip to content

Commit 90cb55b

Browse files
Merge pull request #199 from oracle-samples/198-selectai-issue
Force to string the attribute value in DBMS_CLOUD_AI.SET_ATTRIBUTE()
2 parents 0e8f1af + b65cc33 commit 90cb55b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/server/utils/selectai.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ def set_profile(
6060
logger.info("Updating SelectAI Profile (%s) attribute: %s = %s", profile_name, attribute_name, attribute_value)
6161
# Attribute Names: provider, credential_name, object_list, provider_endpoint, model
6262
# Attribute Names: temperature, max_tokens
63+
64+
if isinstance(attribute_value, float) or isinstance(attribute_value, int):
65+
attribute_value = str(attribute_value)
66+
6367
binds = {"profile_name": profile_name, "attribute_name": attribute_name, "attribute_value": attribute_value}
6468
sql = """
6569
BEGIN

0 commit comments

Comments
 (0)