How to get Images into Librechat using Agents and Actions #8522
Unanswered
ThomasZoellinger
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
So I have the use case to execute some Python code via an action of an agent. Then there is some image as a result.
I then want to send the image back to librechat and display it.
Has somebody managed to do it?
What does your openapi code look like if it works?
`openapi: 3.0.0
info:
title: Image Artifact API
version: 1.0.0
description: An API endpoint dedicated to generating and serving a black JPEG image as a downloadable artifact.
servers:
paths:
/black-jpeg/:
get:
summary: Generate Black JPEG Image Artifact
description: |
Generates a solid black JPEG image of specified dimensions and returns it as a binary artifact.
This image can be downloaded or displayed directly by clients that support 'image/jpeg' content.
parameters:
- in: query
name: width
schema:
type: integer
default: 100
minimum: 1
description: Width of the image in pixels.
- in: query
name: height
schema:
type: integer
default: 100
minimum: 1
description: Height of the image in pixels.
responses:
'200':
description: Successfully generated black JPEG image artifact.
content:
image/jpeg: # <--- This specifies the MIME type of the artifact
schema:
type: string
format: binary # <--- This explicitly marks it as binary data/an artifact
example: '' # Placeholder for the actual binary content`
Beta Was this translation helpful? Give feedback.
All reactions