Skip to main content
Glama

Gotas Commerce MCP Server

completions.mjs2.58 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../resource.mjs"; import { isRequestOptions } from "../../../core.mjs"; import * as MessagesAPI from "./messages.mjs"; import { Messages } from "./messages.mjs"; import { CursorPage } from "../../../pagination.mjs"; export class Completions extends APIResource { constructor() { super(...arguments); this.messages = new MessagesAPI.Messages(this._client); } create(body, options) { return this._client.post('/chat/completions', { body, ...options, stream: body.stream ?? false }); } /** * Get a stored chat completion. Only Chat Completions that have been created with * the `store` parameter set to `true` will be returned. * * @example * ```ts * const chatCompletion = * await client.chat.completions.retrieve('completion_id'); * ``` */ retrieve(completionId, options) { return this._client.get(`/chat/completions/${completionId}`, options); } /** * Modify a stored chat completion. Only Chat Completions that have been created * with the `store` parameter set to `true` can be modified. Currently, the only * supported modification is to update the `metadata` field. * * @example * ```ts * const chatCompletion = await client.chat.completions.update( * 'completion_id', * { metadata: { foo: 'string' } }, * ); * ``` */ update(completionId, body, options) { return this._client.post(`/chat/completions/${completionId}`, { body, ...options }); } list(query = {}, options) { if (isRequestOptions(query)) { return this.list({}, query); } return this._client.getAPIList('/chat/completions', ChatCompletionsPage, { query, ...options }); } /** * Delete a stored chat completion. Only Chat Completions that have been created * with the `store` parameter set to `true` can be deleted. * * @example * ```ts * const chatCompletionDeleted = * await client.chat.completions.del('completion_id'); * ``` */ del(completionId, options) { return this._client.delete(`/chat/completions/${completionId}`, options); } } export class ChatCompletionsPage extends CursorPage { } export class ChatCompletionStoreMessagesPage extends CursorPage { } Completions.ChatCompletionsPage = ChatCompletionsPage; Completions.Messages = Messages; //# sourceMappingURL=completions.mjs.map

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/caiovicentino/mcpGOTAS'

If you have feedback or need assistance with the MCP directory API, please join our Discord server