{"command":{"effect":"write","timeoutSeconds":120,"inputSchema":{"type":"object","description":"Create a message.","properties":{"path":{"type":"object","properties":{"thread_id":{"type":"string","description":"The ID of the [thread](https://developers.openai.com/api/docs/assistants/migration) to create a message for."}},"required":["thread_id"],"additionalProperties":false},"body":{"$ref":"#/definitions/CreateMessageRequest"}},"required":["path","body"],"additionalProperties":false,"definitions":{"CreateMessageRequest":{"type":"object","additionalProperties":false,"required":["role","content"],"properties":{"role":{"type":"string","enum":["user","assistant"],"description":"The role of the entity that is creating the message. Allowed values include:\n- `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.\n- `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation.\n"},"content":{"oneOf":[{"type":"string","description":"The text contents of the message.","title":"Text content"},{"type":"array","description":"An array of content parts with a defined type, each can be of type `text` or images can be passed with `image_url` or `image_file`. Image types are only supported on [Vision-compatible models](https://developers.openai.com/api/docs/models).","title":"Array of content parts","items":{"oneOf":[{"$ref":"#/definitions/MessageContentImageFileObject"},{"$ref":"#/definitions/MessageContentImageUrlObject"},{"$ref":"#/definitions/MessageRequestContentTextObject"}]},"minItems":1}]},"attachments":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"file_id":{"type":"string","description":"The ID of the file to attach to the message."},"tools":{"description":"The tools to add this file to.","type":"array","items":{"oneOf":[{"$ref":"#/definitions/AssistantToolsCode"},{"$ref":"#/definitions/AssistantToolsFileSearchTypeOnly"}]}}}},"description":"A list of files attached to the message, and the tools they should be added to.","required":["file_id","tools"]},{"type":"null"}]},"metadata":{"$ref":"#/definitions/Metadata"}}},"MessageContentImageFileObject":{"title":"Image file","type":"object","description":"References an image [File](https://developers.openai.com/api/reference/resources/files) in the content of a message.","properties":{"type":{"description":"Always `image_file`.","type":"string","enum":["image_file"]},"image_file":{"type":"object","properties":{"file_id":{"description":"The [File](https://developers.openai.com/api/reference/resources/files) ID of the image in the message content. Set `purpose=\"vision\"` when uploading the File if you need to later display the file content.","type":"string"},"detail":{"type":"string","description":"Specifies the detail level of the image if specified by the user. `low` uses fewer tokens, you can opt in to high resolution using `high`.","enum":["auto","low","high"],"default":"auto"}},"required":["file_id"]}},"required":["type","image_file"]},"MessageContentImageUrlObject":{"title":"Image URL","type":"object","description":"References an image URL in the content of a message.","properties":{"type":{"type":"string","enum":["image_url"],"description":"The type of the content part."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.","format":"uri"},"detail":{"type":"string","description":"Specifies the detail level of the image. `low` uses fewer tokens, you can opt in to high resolution using `high`. Default value is `auto`","enum":["auto","low","high"],"default":"auto"}},"required":["url"]}},"required":["type","image_url"]},"MessageRequestContentTextObject":{"title":"Text","type":"object","description":"The text content that is part of a message.","properties":{"type":{"description":"Always `text`.","type":"string","enum":["text"]},"text":{"type":"string","description":"Text content to be sent to the model"}},"required":["type","text"]},"AssistantToolsCode":{"type":"object","title":"Code interpreter tool","properties":{"type":{"type":"string","description":"The type of tool being defined: `code_interpreter`","enum":["code_interpreter"]}},"required":["type"]},"AssistantToolsFileSearchTypeOnly":{"type":"object","title":"FileSearch tool","properties":{"type":{"type":"string","description":"The type of tool being defined: `file_search`","enum":["file_search"]}},"required":["type"]},"Metadata":{"anyOf":[{"type":"object","description":"Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.\n","additionalProperties":{"type":"string"}},{"type":"null"}]}}},"name":"Create message","id":"openai.createmessage","example":{"path":{"thread_id":"example"},"body":{"role":"user","content":"example"}},"maxRequests":1,"summary":false}}