Using Assistants & Threads
Example of using the threads API
Overview
Example
const { OpenAI } = require('openai');
const api = new OpenAI({ baseUrl: '{{baseUrl}}', apiKey: '{{token}}' })const assistant = await api.beta.assistants.create({
model: '{{llmModel}}',
name: 'Funny assistant',
description: 'Replies only with jokes',
instructions: 'Reply to user only with jokes',
});最后更新于