Create a message.
Request body which must comply to the following JSON Schema:
{ "required" : [ "content", "role" ], "type" : "object", "properties" : { "role" : { "type" : "string", "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", "enum" : [ "user", "assistant" ] }, "content" : { "oneOf" : [ { "title" : "Text content", "type" : "string", "description" : "The text contents of the message." }, { "title" : "Array of content parts", "minItems" : 1, "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](/docs/models/overview).", "items" : { "oneOf" : [ { "title" : "Image file", "required" : [ "image_file", "type" ], "type" : "object", "properties" : { "type" : { "type" : "string", "description" : "Always `image_file`.", "enum" : [ "image_file" ] }, "image_file" : { "required" : [ "file_id" ], "type" : "object", "properties" : { "file_id" : { "type" : "string", "description" : "The [File](/docs/api-reference/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." }, "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`.", "default" : "auto", "enum" : [ "auto", "low", "high" ] } } } }, "description" : "References an image [File](/docs/api-reference/files) in the content of a message." }, { "title" : "Image URL", "required" : [ "image_url", "type" ], "type" : "object", "properties" : { "type" : { "type" : "string", "description" : "The type of the content part.", "enum" : [ "image_url" ] }, "image_url" : { "required" : [ "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`", "default" : "auto", "enum" : [ "auto", "low", "high" ] } } } }, "description" : "References an image URL in the content of a message." }, { "title" : "Text", "required" : [ "text", "type" ], "type" : "object", "properties" : { "type" : { "type" : "string", "description" : "Always `text`.", "enum" : [ "text" ] }, "text" : { "type" : "string", "description" : "Text content to be sent to the model" } }, "description" : "The text content that is part of a message." } ], "x-oaiExpandable" : true } } ], "x-oaiExpandable" : true }, "attachments" : { "required" : [ "file_id", "tools" ], "type" : "array", "description" : "A list of files attached to the message, and the tools they should be added to.", "nullable" : true, "items" : { "type" : "object", "properties" : { "file_id" : { "type" : "string", "description" : "The ID of the file to attach to the message." }, "tools" : { "type" : "array", "description" : "The tools to add this file to.", "items" : { "oneOf" : [ { "title" : "Code interpreter tool", "required" : [ "type" ], "type" : "object", "properties" : { "type" : { "type" : "string", "description" : "The type of tool being defined: `code_interpreter`", "enum" : [ "code_interpreter" ] } } }, { "title" : "FileSearch tool", "required" : [ "type" ], "type" : "object", "properties" : { "type" : { "type" : "string", "description" : "The type of tool being defined: `file_search`", "enum" : [ "file_search" ] } } } ], "x-oaiExpandable" : true } } } } }, "metadata" : { "type" : "object", "description" : "metadata_description", "nullable" : true, "x-oaiTypeLabel" : "map" } }, "additionalProperties" : false }
Specify how the response should be mapped to the table output. The following formats are available:
Raw Response: Returns the raw response in a single row with the following columns:
You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.
To use this node in KNIME, install the extension OpenAI Nodes from the below update site following our NodePit Product and Node Installation Guide:
A zipped version of the software site can be downloaded here.
Deploy, schedule, execute, and monitor your KNIME workflows locally, in the cloud or on-premises – with our brand new NodePit Runner.
Try NodePit Runner!Do you have feedback, questions, comments about NodePit, want to support this platform, or want your own nodes or workflows listed here as well? Do you think, the search results could be improved or something is missing? Then please get in touch! Alternatively, you can send us an email to mail@nodepit.com.
Please note that this is only about NodePit. We do not provide general support for KNIME — please use the KNIME forums instead.