

在
出去


Text to Speech
const { OpenAI } = require('openai');
const main = async () => {
const api = new OpenAI({ apiKey: '', baseURL: 'https://api.ai.cc/v1' });
const text = 'Your text string goes here';
const response = await api.embeddings.create({
input: text,
model: 'togethercomputer/m2-bert-80M-32k-retrieval',
});
const embedding = response.data[0].embedding;
console.log(embedding);
};
main();
import json
from openai import OpenAI
def main():
client = OpenAI(
base_url="https://api.ai.cc/v1",
api_key="",
)
text = "Your text string goes here"
response = client.embeddings.create(input=text, model="togethercomputer/m2-bert-80M-32k-retrieval")
embedding = response.data[0].embedding
print(json.dumps(embedding, indent=2))
main()
- API 操练场(Playground)

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


产品详情



登录