You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I am trying to reproduce the Astrodaily plugin from the plugin retreival from OpenAi, but no image is showed in chatGPT.
I mounted the folders where the images are stored, the image is found but nothing is showed
What do you think is missing?
app = FastAPI(dependencies=[Depends(validate_token)])
app.mount("/.well-known/", StaticFiles(directory=".well-known"), name="static")
# Mount "img" subdirectory at path "/img"
app.mount("/img/", StaticFiles(directory="img"), name="img")
[...]
@app.get("/nasa", response_model=NasaResponse)
async def nasa(dependencies=[Depends(validate_token)]):
try:
# Log the list of files
logger.info(f"Nasa before Current working directory: {os.getcwd()}")
files = os.listdir('.')
logger.info(f"Files in current directory: {files}")
imageURL="./img/nasa_hubble.jpg"
try:
# Get the file size
file_size = os.stat(imageURL).st_size
# Log the file size
logger.info(f'The size of the image file is {file_size} bytes')
except FileNotFoundError:
logger.error(f'The file {imageURL} was not found.')
except PermissionError:
logger.error(f'Permission denied for accessing the file {imageURL}.')
return NasaResponse(imageURL=imageURL)
except Exception as e:
logger.error(e)
raise HTTPException(status_code=500, detail="Internal Service Error")
The text was updated successfully, but these errors were encountered:
Hello,
I am trying to reproduce the Astrodaily plugin from the plugin retreival from OpenAi, but no image is showed in chatGPT.
I mounted the folders where the images are stored, the image is found but nothing is showed
What do you think is missing?
The text was updated successfully, but these errors were encountered: