The page has been translated by Gen AI.
AIOS Connect
AIOS Linking
You can use LLM by linking Cloud Functions with AIOS.
AIOS LLM Private Endpoint
The URL of the AIOS LLM private endpoint is as follows.
- Samsung Cloud Platform for Samsung: https://aios.private.kr-west1.s.samsungsdscloud.com
- Samsung Cloud Platform for Enterprize: https://aios.private.kr-west1.e.samsungsdscloud.com
Reference
Refer to the following for detailed information on the availability and provision model of AIOS services by region.
- Availability of AIOS services by region: AIOS Service - Regional Availability Reference
- AIOS service provided LLM model: AIOS Service - LLM Provided Model reference
Blueprint Change Source Code
To integrate Cloud Functions with AIOS, you need to change the URL address in the Blueprint to match the LLM Endpoint used in each region. To change the Blueprint source code, follow the steps below.
- All Services > Compute > Cloud Functions Click the menu. Go to the Service Home page of Cloud Functions.
- Service Home on the page click the Cloud Functions menu. Navigate to the Function list page.
- On the Function List page, click the resource to be called via URL. You will be taken to the Function Detail page.
- After clicking the Code tab, click the Edit button. Navigate to the Function Code Edit page.
- After modifying the Blueprint using Python, Node.js, Go Runtime source code, click the Save button.
Python source code
Color modeimport json import requests def handle_request(params): # User writing area (Function details) url = "{AIOS LLM private endpoint}/{API}" # Destination URL data = { "model": "openai/gpt-oss-120b" , "prompt" : "Write a haiku about recursion in programming." , "temperature": 0 , "max_tokens": 100 , "stream": False } try: response = requests.post(url, json=data, verify=True) return { 'statusCode': response.status_code, 'body': json.dumps(response.text) } except requests.exceptions.RequestException as e: return str(e)import json import requests def handle_request(params): # User writing area (Function details) url = "{AIOS LLM private endpoint}/{API}" # Destination URL data = { "model": "openai/gpt-oss-120b" , "prompt" : "Write a haiku about recursion in programming." , "temperature": 0 , "max_tokens": 100 , "stream": False } try: response = requests.post(url, json=data, verify=True) return { 'statusCode': response.status_code, 'body': json.dumps(response.text) } except requests.exceptions.RequestException as e: return str(e)Python source code Node.js source code
Color modeconst request = require('request'); /** * @description User writing area (Function details) */ exports.handleRequest = async function (params) { return await sendRequest(params); }; async function sendRequest(req) { return new Promise((resolve, reject) => { url = "{AIOS LLM private endpoint}/{API}" data = { model: 'openai/gpt-oss-120b' , prompt : 'Write a haiku about recursion in programming.' , temperature: 0 , max_tokens: 100 , stream: false } const options = { uri: url, method:'POST', body: data, json: true, strictSSL: false, rejectUnauthorized: false } request(options, (error, response, body) => { if (error) { reject(error); } else { resolve({ statusCode: response.statusCode, body: JSON.stringify(body) }); } }); }); }const request = require('request'); /** * @description User writing area (Function details) */ exports.handleRequest = async function (params) { return await sendRequest(params); }; async function sendRequest(req) { return new Promise((resolve, reject) => { url = "{AIOS LLM private endpoint}/{API}" data = { model: 'openai/gpt-oss-120b' , prompt : 'Write a haiku about recursion in programming.' , temperature: 0 , max_tokens: 100 , stream: false } const options = { uri: url, method:'POST', body: data, json: true, strictSSL: false, rejectUnauthorized: false } request(options, (error, response, body) => { if (error) { reject(error); } else { resolve({ statusCode: response.statusCode, body: JSON.stringify(body) }); } }); }); }Node.js Source Code GO source code
Color modepackage gofunction import ( "bytes" "net/http" "encoding/json" "io/ioutil" ) type PostData struct { Model string `json:"model"` Prompt string `json:"prompt"` Temperature int `json:"temperature"` MaxTokens int `json:"max_tokens"` Stream bool `json:"stream"` } func HandleRequest(r *http.Request)(string, error) { url := "{AIOS LLM private endpoint}/{API}" data := PostData { Model: "openai/gpt-oss-120b", Prompt: "Write a haiku about recursion in programming.", Temperature: 0, MaxTokens: 100, Stream: false, } jsonData, err := json.Marshal(data) if err != nil { panic(err) } req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonData)) if err != nil { panic(err) } req.Header.Set("Content-Type", "application/json") client := &http.Client{} resp, err := client.Do(req) if err != nil { panic(err) } defer resp.Body.Close() // Read response body body, err := ioutil.ReadAll(resp.Body) if err != nil { panic(err) } return string(body), nil "}package gofunction import ( "bytes" "net/http" "encoding/json" "io/ioutil" ) type PostData struct { Model string `json:"model"` Prompt string `json:"prompt"` Temperature int `json:"temperature"` MaxTokens int `json:"max_tokens"` Stream bool `json:"stream"` } func HandleRequest(r *http.Request)(string, error) { url := "{AIOS LLM private endpoint}/{API}" data := PostData { Model: "openai/gpt-oss-120b", Prompt: "Write a haiku about recursion in programming.", Temperature: 0, MaxTokens: 100, Stream: false, } jsonData, err := json.Marshal(data) if err != nil { panic(err) } req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonData)) if err != nil { panic(err) } req.Header.Set("Content-Type", "application/json") client := &http.Client{} resp, err := client.Do(req) if err != nil { panic(err) } defer resp.Body.Close() // Read response body body, err := ioutil.ReadAll(resp.Body) if err != nil { panic(err) } return string(body), nil "}GO source code