Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
deepseek/deepseek-v4-flash-vision-exp 将于 2026 年 11 月 29 日下线,tencent/hy4-preview 将于 2026 年 12 月 6 日下线 查看下架公告
了解 PPIO Code Interpreter 的归档使用说明,认识该版本在沙箱中运行代码的方式,为维护既有代码执行应用提供参考。
code-interpreter-v1
import { Sandbox } from 'ppio-sandbox/code-interpreter'; const sandbox = await Sandbox.create(); const result = await sandbox.runCode( ` import requests response = requests.get("https://sandbox.ppio.cn/health") print(response.text) `, { language: "python" } ); console.log(result); await sandbox.kill();
from ppio_sandbox.code_interpreter import Sandbox sandbox = Sandbox.create() result = sandbox.run_code(""" import requests response = requests.get("https://sandbox.ppio.cn/health") print(response.text)""", language="python") print(result) sandbox.kill()
import { Sandbox } from 'ppio-sandbox/code-interpreter'; // Create a new sandbox const sandbox = await Sandbox.create(); await sandbox.commands.run('npm install axios'); // Run the code const execution = await sandbox.runCode(` import axios from "axios"; const url: string = "https://sandbox.ppio.cn/health"; const response = await axios.get(url); console.log(response.data); `, { language: "ts" } ); console.log(execution); await sandbox.kill();
from ppio_sandbox.code_interpreter import Sandbox # Create a new sandbox sandbox = Sandbox.create() # Install the axios package sandbox.commands.run('npm install axios') # Run the code execution = sandbox.run_code(""" import axios from "axios"; const url: string = "https://sandbox.ppio.cn/health"; const response = await axios.get(url); console.log(response.data);""", language="ts") print(execution) sandbox.kill()
import { Sandbox } from 'ppio-sandbox/code-interpreter'; const sandbox = await Sandbox.create(); const result = await sandbox.runCode( ` url <- "https://sandbox.ppio.cn/health" content <- readLines(url, warn = FALSE) print(paste(content, collapse = "\\n")) `, { language: "r" } ); console.log(result); await sandbox.kill();
from ppio_sandbox.code_interpreter import Sandbox sandbox = Sandbox.create() result = sandbox.run_code(""" url <- "https://sandbox.ppio.cn/health" content <- readLines(url, warn = FALSE) print(paste(content, collapse = "\\n"))""", language="r") print(result) sandbox.kill()
import { Sandbox } from 'ppio-sandbox/code-interpreter'; const sandbox = await Sandbox.create(); const execution = await sandbox.runCode(` import java.net.*; import java.io.*; URL url = new URL("https://sandbox.ppio.cn/health");HttpURLConnection con = (HttpURLConnection) url.openConnection();con.setRequestMethod("GET"); BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer content = new StringBuffer(); while ((inputLine = in.readLine()) != null) { content.append(inputLine); } in.close(); con.disconnect(); System.out.println(content.toString()); `, { language: 'java' }); console.log(execution); await sandbox.kill();
from ppio_sandbox.code_interpreter import Sandbox sandbox = Sandbox.create() execution = sandbox.run_code(""" import java.net.*; import java.io.*; URL url = new URL("https://sandbox.ppio.cn/health");HttpURLConnection con = (HttpURLConnection) url.openConnection();con.setRequestMethod("GET"); BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer content = new StringBuffer(); while ((inputLine = in.readLine()) != null) { content.append(inputLine); } in.close(); con.disconnect(); System.out.println(content.toString());""", language="java") print(execution) sandbox.kill()
import { Sandbox } from 'ppio-sandbox/code-interpreter'; const sandbox = await Sandbox.create(); const execution = await sandbox.runCode( 'curl -s https://sandbox.ppio.cn/health', { language: 'bash' }, ); console.log(execution); await sandbox.kill();
from ppio_sandbox.code_interpreter import Sandbox sandbox = Sandbox.create() execution = sandbox.run_code( 'curl -s https://sandbox.ppio.cn/health', language='bash' ) print(execution) sandbox.kill()