MAAS / app /keywords /keywords_service.py
Hammad712's picture
Updated content relevance and added keywords endpoint
538360f
raw
history blame contribute delete
353 Bytes
from .prompt import chain
from .model import BusinessDescription, KeywordsResponse
def generate_keywords_service(input_data: BusinessDescription) -> KeywordsResponse:
"""Invoke the LangChain chain to generate keywords."""
result: KeywordsResponse = chain.invoke({
"business_description": input_data.description
})
return result