Lib
The sdk.lib object provides access to a curated set of third-party libraries that are safely exposed within the MonoChat environment. These libraries can be used in your Custom View functions to extend functionality, integrate with APIs, parse files, and more.
συμβουλή
💡 The list of available libraries may grow over time. Always refer to the latest MonoChat SDK documentation or contact support for an up-to-date list.
Available Libraries
OpenAI
Provides access to the official OpenAI SDK. You can use it to interact with OpenAI APIs if authorized and configured.
const openai = new sdk.lib.OpenAI({ apiKey: '...' })
const response = await openai.chat.completions.create({
model: 'gpt-4',
messages: [{ role: 'user', content: 'Hello world!' }]
})
fetch
Standard Fetch API to make HTTP requests.
const response = await sdk.lib.fetch('https://api.example.com/data')
const json = await response.json()