Closed InquestGeronimo closed 2 months ago
You should be able to hijack files item in the payload from inlet.
@tjbck can you point me in the right direction, is the inlet in the pipe function? I currently only know of these 4 variables: user_message, model_id, messages, body. When I print these variables I don't see any data relating to file uploads.
nevermind, i found it, I have to add an inlet function:
async def inlet(self, body: dict, user: dict) -> dict:
# This function is called before the OpenAI API request is made. You can modify the form data before it is sent to the OpenAI API.
print(f"inlet:{__name__}")
print(body)
print(user)
return body
Hi it would be great if we could have the ability to pass a file object to a custom pipeline for document understanding/summarization.