- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2025 08:06 AM
Thanks @KaushalVachhani for such a detailed suggestion. Here is what I have configured. Due to org policy I am not able to upload any screenshot.
function to call llm
=========
%sql
CREATE OR REPLACE FUNCTION ask_llm(
question STRING
)
RETURNS STRING
LANGUAGE PYTHON
AS $$
import requests
endpoint = "<ENDPOINT>"
token = "<TOEKN>"
headers = {
"Authorization": f"Bearer {token}",
"Content-Type": "application/json"
}
data = {
"messages": [
{"role": "user", "content": question}
]
}
response = requests.post(endpoint, headers=headers, json=data)
if response.status_code == 200:
return response.json().get("choices", [{}])[0].get("message", {}).get("content", "")
else:
return f"Error: {response.text}"
$$
And this the configuration of Multi Agent Supervisor . 1st Subagent Genie followed by above mentioned function as 2nd. When I ask the agent "What all UC functions you can use?" It give below answer.