-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
# `snowflake-ml-python=1.8.1`
model = 'llama3.2-3b'
#options = cortex.CompleteOptions(top_p=0, temperature=0)
resp = cortex.complete(model, 'tell me a joke', options={})
print(resp)
options = cortex.CompleteOptions(guardrails=True)
resp = cortex.complete(model, 'tell me a joke', options=options)
print(resp)
Both return a string without meta data (usage, created, model).
While cortex.Complete
with options
argument in the old version snowflake-ml-python=1.6.0
returns a JSON string with meta data.
Activity
[-]new complete with optiona not returning meta data[/-][+]SNOW-2040843: new complete with optiona not returning meta data[/+][-]SNOW-2040843: new complete with optiona not returning meta data[/-][+]new complete with options not returning meta data[/+]sfc-gh-bprosnitz commentedon Apr 23, 2025
Thanks for reaching out about this. There is an alternate API which can provide the metadata: https://docs.snowflake.com/en/developer-guide/snowflake-python-api/reference/latest/_autosummary/snowflake.core.cortex.inference_service.CortexInferenceService
Does this help for your use case?
ChuliangXiao commentedon Apr 23, 2025
@sfc-gh-bprosnitz can you provide a code snippet?