

在
出去


Text to Speech
const { OpenAI } = require('openai');
const api = new OpenAI({ apiKey: '', baseURL: 'https://api.ai.cc/v1' });
const main = async () => {
const prompt = `
All of the states in the USA:
- Alabama, Mongomery;
- Arkansas, Little Rock;
`;
const response = await api.completions.create({
prompt,
model: 'meta-llama/Llama-2-13b-hf',
});
const text = response.choices[0].text;
console.log('Completion:', text);
};
main();
from openai import OpenAI
client = OpenAI(
api_key="",
base_url="https://api.ai.cc/v1",
)
def main():
response = client.completions.create(
model="meta-llama/Llama-2-13b-hf",
prompt="""
All of the states in the USA:
- Alabama, Mongomery;
- Arkansas, Little Rock;
""",
)
completion = response.choices[0].text
print(f"Completion: {completion}")
main()
- API 操练场(Playground)

在集成之前,请在沙箱环境中测试所有 API 模型。
我们提供 300 多种模型供您集成到您的应用程序中。


产品详情



登录