File size: 667 Bytes
9f72bcf
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
from src.genai.utils.models_loader import llm_gpt
from src.genai.ideation_agent.utils.prompts import ideator_prompt_v3
from src.genai.ideation_agent.utils.schemas import ideation_json_schema
from api.stored_data import stored_data
from langchain_core.messages import HumanMessage , SystemMessage

template =ideator_prompt_v3(stored_data['business_details'])
messages = [SystemMessage(content=template),
                    HumanMessage(content=f'''The business_details is\n{stored_data['business_details']}\n 
                    The information of the image is:\n''')]

response = llm_gpt.with_structured_output(ideation_json_schema).invoke(messages)
print(response)