File size: 345 Bytes
83a18c0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from typing import TypedDict
from .prompt import chain

class State(TypedDict):
    pass


async def image_explainer(base64_image, domain, topic, question):
    response = await chain.ainvoke({
        "base64_image": base64_image,
        "domain": domain,
        "topic": topic,
        "question": question
    })
    return response.content