trygithubactions / check.py
subashpoudel's picture
next commit
9f72bcf
raw
history blame
667 Bytes
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)