MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / getChatCompletionsUrl

Function getChatCompletionsUrl

src/ifcchat/api_openai.js:1–4  ·  view source on GitHub ↗
(baseURL)

Source from the content-addressed store, hash-verified

1function getChatCompletionsUrl(baseURL) {
2 const root = (baseURL || "https://api.openai.com/v1").replace(/\/+$/, "");
3 return `${root}/chat/completions`;
4}
5
6export async function chat({ apiKey, baseURL, model, messages, tools }) {
7 const res = await fetch(getChatCompletionsUrl(baseURL), {

Callers 1

chatFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected