Spaces:
Sleeping
Sleeping
Commit
·
583f6dd
1
Parent(s):
6c655a3
Included CI CD
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .github/workflows/main.yaml +29 -0
- {brainstroming_agent → api}/__init__.py +0 -0
- api/main.py +18 -0
- {brainstroming_agent/utils → api/routers}/__init__.py +0 -0
- api/routers/brainstorm.py +40 -0
- api/routers/context_analysis.py +28 -0
- api/routers/generate_final_story.py +15 -0
- api/routers/generate_image.py +14 -0
- api/routers/human_idea_refining.py +25 -0
- api/routers/ideation.py +28 -0
- api/routers/orchestration.py +30 -0
- api/routers/show_analytics.py +9 -0
- api/stored_data.py +10 -0
- brainstroming_agent/__pycache__/__init__.cpython-312.pyc +0 -0
- brainstroming_agent/__pycache__/agent.cpython-312.pyc +0 -0
- brainstroming_agent/utils/__pycache__/__init__.cpython-312.pyc +0 -0
- brainstroming_agent/utils/__pycache__/business_interaction.cpython-312.pyc +0 -0
- brainstroming_agent/utils/__pycache__/check.cpython-312.pyc +0 -0
- brainstroming_agent/utils/__pycache__/data_loader.cpython-312.pyc +0 -0
- brainstroming_agent/utils/__pycache__/initial_interaction.cpython-312.pyc +0 -0
- brainstroming_agent/utils/__pycache__/models.cpython-312.pyc +0 -0
- brainstroming_agent/utils/__pycache__/models_loader.cpython-312.pyc +0 -0
- brainstroming_agent/utils/__pycache__/nodes.cpython-312.pyc +0 -0
- brainstroming_agent/utils/__pycache__/prompts.cpython-312.pyc +0 -0
- brainstroming_agent/utils/__pycache__/state.cpython-312.pyc +0 -0
- brainstroming_agent/utils/__pycache__/tools.cpython-312.pyc +0 -0
- brainstroming_agent/utils/__pycache__/utils.cpython-312.pyc +0 -0
- brainstroming_agent/utils/__pycache__/validators.cpython-312.pyc +0 -0
- business_interaction_agent/__pycache__/__init__.cpython-312.pyc +0 -0
- business_interaction_agent/__pycache__/agent.cpython-312.pyc +0 -0
- business_interaction_agent/utils/__pycache__/__init__.cpython-312.pyc +0 -0
- business_interaction_agent/utils/__pycache__/nodes.cpython-312.pyc +0 -0
- business_interaction_agent/utils/__pycache__/prompts.cpython-312.pyc +0 -0
- business_interaction_agent/utils/__pycache__/state.cpython-312.pyc +0 -0
- business_interaction_agent/utils/__pycache__/utils.cpython-312.pyc +0 -0
- context_analysis_agent/__pycache__/__init__.cpython-312.pyc +0 -0
- context_analysis_agent/__pycache__/agent.cpython-312.pyc +0 -0
- context_analysis_agent/utils/__pycache__/__init__.cpython-312.pyc +0 -0
- context_analysis_agent/utils/__pycache__/nodes.cpython-312.pyc +0 -0
- context_analysis_agent/utils/__pycache__/prompts.cpython-312.pyc +0 -0
- context_analysis_agent/utils/__pycache__/state.cpython-312.pyc +0 -0
- context_analysis_agent/utils/__pycache__/utils.cpython-312.pyc +0 -0
- ideation_agent/__pycache__/__init__.cpython-312.pyc +0 -0
- ideation_agent/__pycache__/agent.cpython-312.pyc +0 -0
- ideation_agent/utils/__pycache__/nodes.cpython-312.pyc +0 -0
- ideation_agent/utils/__pycache__/prompts.cpython-312.pyc +0 -0
- ideation_agent/utils/__pycache__/state.cpython-312.pyc +0 -0
- ideation_agent/utils/__pycache__/tools.cpython-312.pyc +0 -0
- main.py +10 -10
- requirements.txt +1 -1
.github/workflows/main.yaml
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: FastAPI CI
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches: [main]
|
| 6 |
+
pull_request:
|
| 7 |
+
branches: [main]
|
| 8 |
+
|
| 9 |
+
jobs:
|
| 10 |
+
build-and-test:
|
| 11 |
+
runs-on: ubuntu-latest
|
| 12 |
+
|
| 13 |
+
steps:
|
| 14 |
+
- name: Checkout code
|
| 15 |
+
uses: actions/checkout@v3
|
| 16 |
+
|
| 17 |
+
- name: Set up Python
|
| 18 |
+
uses: actions/setup-python@v4
|
| 19 |
+
with:
|
| 20 |
+
python-version: '3.11'
|
| 21 |
+
|
| 22 |
+
- name: Install dependencies
|
| 23 |
+
run: |
|
| 24 |
+
python -m pip install --upgrade pip
|
| 25 |
+
pip install -r requirements.txt
|
| 26 |
+
pip install pytest
|
| 27 |
+
|
| 28 |
+
- name: Run tests
|
| 29 |
+
run: pytest
|
{brainstroming_agent → api}/__init__.py
RENAMED
|
File without changes
|
api/main.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from fastapi import FastAPI
|
| 2 |
+
from .routers import orchestration, context_analysis, ideation , human_idea_refining , brainstorm , generate_final_story , generate_image
|
| 3 |
+
|
| 4 |
+
app = FastAPI()
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
@app.get("/")
|
| 8 |
+
async def root():
|
| 9 |
+
return {'response':'Hello'}
|
| 10 |
+
|
| 11 |
+
app.include_router(orchestration.router, prefix="/api")
|
| 12 |
+
app.include_router(context_analysis.router, prefix="/api")
|
| 13 |
+
app.include_router(ideation.router, prefix="/api")
|
| 14 |
+
app.include_router(human_idea_refining.router, prefix="/api")
|
| 15 |
+
app.include_router(brainstorm.router, prefix="/api")
|
| 16 |
+
app.include_router(generate_final_story.router, prefix="/api")
|
| 17 |
+
app.include_router(generate_image.router, prefix="/api")
|
| 18 |
+
|
{brainstroming_agent/utils → api/routers}/__init__.py
RENAMED
|
File without changes
|
api/routers/brainstorm.py
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from fastapi import APIRouter
|
| 2 |
+
from api.stored_data import stored_data
|
| 3 |
+
from pydantic import BaseModel
|
| 4 |
+
from typing import Optional
|
| 5 |
+
from src.genai.brainstroming_agent.agent import brainstroming_graph
|
| 6 |
+
|
| 7 |
+
router=APIRouter()
|
| 8 |
+
brainstrom_graph = brainstroming_graph()
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class BrainstormRequest(BaseModel):
|
| 12 |
+
preferred_topics: Optional[list] = []
|
| 13 |
+
image_base64_list: Optional[list] = []
|
| 14 |
+
thread_id: Optional[str]="default-session"
|
| 15 |
+
|
| 16 |
+
@router.post("/brainstorm")
|
| 17 |
+
def brainstroming_endpoint(
|
| 18 |
+
request: BrainstormRequest, # 🔥 Full JSON body here
|
| 19 |
+
):
|
| 20 |
+
idea = (
|
| 21 |
+
[stored_data['refined_ideation']]
|
| 22 |
+
if stored_data.get('refined_ideation')
|
| 23 |
+
else [str(stored_data['final_ideation'])]
|
| 24 |
+
if stored_data.get('final_ideation')
|
| 25 |
+
else ['''I don't have any idea right now. Create your own **very creative** and **out of the box** video idea and generate the story for now.'''])
|
| 26 |
+
|
| 27 |
+
result = brainstrom_graph.invoke({
|
| 28 |
+
'idea': idea,
|
| 29 |
+
'images': request.image_base64_list,
|
| 30 |
+
'latest_preferred_topics': request.preferred_topics,
|
| 31 |
+
'business_details': stored_data['business_details']
|
| 32 |
+
},
|
| 33 |
+
config={"configurable": {"thread_id": request.thread_id}})
|
| 34 |
+
|
| 35 |
+
stored_data['brainstroming_response'] = result
|
| 36 |
+
|
| 37 |
+
return {'response':{
|
| 38 |
+
"story": result['stories'][-1],
|
| 39 |
+
"brainstorming_topics": result['brainstroming_topics'][-1]
|
| 40 |
+
}}
|
api/routers/context_analysis.py
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import ast
|
| 2 |
+
from fastapi import APIRouter, Depends
|
| 3 |
+
from pydantic import BaseModel
|
| 4 |
+
from api.stored_data import stored_data
|
| 5 |
+
from src.genai.context_analysis_agent.agent import IntroductionChatbot
|
| 6 |
+
router = APIRouter()
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
class UserMessage(BaseModel):
|
| 10 |
+
message: str
|
| 11 |
+
context_analysis_graph = IntroductionChatbot()
|
| 12 |
+
|
| 13 |
+
@router.post("/context-analysis")
|
| 14 |
+
def context_analysis(msg: UserMessage):
|
| 15 |
+
response = context_analysis_graph.chat(msg.message)
|
| 16 |
+
if context_analysis_graph.is_complete(response):
|
| 17 |
+
details = context_analysis_graph.extract_details()
|
| 18 |
+
if type(details) != dict:
|
| 19 |
+
details = details.model_dump()
|
| 20 |
+
print('Business_details:',details)
|
| 21 |
+
if isinstance(details, str):
|
| 22 |
+
details= ast.literal_eval(details)
|
| 23 |
+
print('Details Type:',type(details))
|
| 24 |
+
# save_to_db(details)
|
| 25 |
+
stored_data['business_details'] = details
|
| 26 |
+
context_analysis_graph.reset()
|
| 27 |
+
return {"response": response, "business_details": details, "complete": True}
|
| 28 |
+
return {"response": response, "complete": False}
|
api/routers/generate_final_story.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from fastapi import APIRouter
|
| 2 |
+
from api.stored_data import stored_data
|
| 3 |
+
from src.genai.brainstroming_agent.utils.utils import generate_final_story
|
| 4 |
+
|
| 5 |
+
router= APIRouter()
|
| 6 |
+
|
| 7 |
+
@router.post("/generate-final-story")
|
| 8 |
+
def generate_final_story_endpoint():
|
| 9 |
+
final_story = generate_final_story(
|
| 10 |
+
stored_data.get("brainstroming_response") or stored_data.get("business_details")
|
| 11 |
+
)
|
| 12 |
+
stored_data['final_story']=final_story
|
| 13 |
+
return {
|
| 14 |
+
'response': final_story
|
| 15 |
+
}
|
api/routers/generate_image.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from fastapi import APIRouter
|
| 2 |
+
from api.stored_data import stored_data
|
| 3 |
+
from src.genai.brainstroming_agent.utils.utils import generate_image
|
| 4 |
+
router = APIRouter()
|
| 5 |
+
|
| 6 |
+
@router.post("/generate-image")
|
| 7 |
+
def generate_image_endpoint():
|
| 8 |
+
image = generate_image(str(stored_data.get('final_story','''I don't have any story right now. Just use the business details for now.'''))
|
| 9 |
+
,str(stored_data.get('business_details'))
|
| 10 |
+
,str(stored_data.get('refined_ideation','''I don't have any idea right now. Just use the business details for now.''')))
|
| 11 |
+
stored_data['generated_image']=image
|
| 12 |
+
return {
|
| 13 |
+
'response':image
|
| 14 |
+
}
|
api/routers/human_idea_refining.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from fastapi import APIRouter
|
| 2 |
+
from pydantic import BaseModel
|
| 3 |
+
from typing import Optional
|
| 4 |
+
from api.stored_data import stored_data
|
| 5 |
+
from src.genai.human_refined_ideation.agent import human_refined_idea
|
| 6 |
+
router= APIRouter()
|
| 7 |
+
human_refine_graph = human_refined_idea()
|
| 8 |
+
|
| 9 |
+
class RefineIdeationRequest(BaseModel):
|
| 10 |
+
query: str
|
| 11 |
+
thread_id: Optional[str]="refine_ideas_thread"
|
| 12 |
+
|
| 13 |
+
@router.post("/human-idea-refining")
|
| 14 |
+
def human_idea_refine_endpoint(request:RefineIdeationRequest):
|
| 15 |
+
stored_data['human_ideation_interactions'].append({"role": "user", "content": request.query})
|
| 16 |
+
response = human_refine_graph.invoke(
|
| 17 |
+
{
|
| 18 |
+
'query': stored_data['human_ideation_interactions'],
|
| 19 |
+
'business_details': stored_data["business_details"],
|
| 20 |
+
'final_ideation': stored_data.get('final_ideation',["","","",""]),
|
| 21 |
+
},config={"configurable": {"thread_id": request.thread_id}}
|
| 22 |
+
)
|
| 23 |
+
stored_data['human_ideation_interactions'].append({"role": "assistant", "content": response['result']})
|
| 24 |
+
stored_data['refined_ideation'] = stored_data['human_ideation_interactions'][-1]['content']
|
| 25 |
+
return {'response' : stored_data['human_ideation_interactions'][-1]['content'] }
|
api/routers/ideation.py
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import ast
|
| 2 |
+
from fastapi import APIRouter
|
| 3 |
+
from api.stored_data import stored_data
|
| 4 |
+
from src.genai.ideation_agent.agent import ideation_graph
|
| 5 |
+
from langgraph.errors import GraphRecursionError
|
| 6 |
+
|
| 7 |
+
router = APIRouter()
|
| 8 |
+
idea_graph = ideation_graph()
|
| 9 |
+
|
| 10 |
+
@router.post("/ideation")
|
| 11 |
+
def ideation_endpoint():
|
| 12 |
+
config={"recursion_limit":15, "configurable": {"thread_id": "ideation_thread123"}}
|
| 13 |
+
try:
|
| 14 |
+
result = idea_graph.invoke(
|
| 15 |
+
{
|
| 16 |
+
'business_details': [stored_data['business_details']],
|
| 17 |
+
'image_caption': [stored_data['image_caption'] if 'image_caption' in stored_data else ""]
|
| 18 |
+
|
| 19 |
+
},
|
| 20 |
+
config=config,
|
| 21 |
+
)
|
| 22 |
+
stored_data['final_ideation'] = result['improver_response'][-1]
|
| 23 |
+
stored_data['final_ideation']=ast.literal_eval(stored_data['final_ideation'])
|
| 24 |
+
|
| 25 |
+
return {'response':ast.literal_eval(result['improver_response'][-1])}
|
| 26 |
+
except GraphRecursionError:
|
| 27 |
+
result = idea_graph.get_state({"configurable": {"thread_id": "ideation_thread123"}})
|
| 28 |
+
return {'response': result[0]}
|
api/routers/orchestration.py
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from fastapi import APIRouter, Depends
|
| 2 |
+
from pydantic import BaseModel
|
| 3 |
+
from api.stored_data import stored_data
|
| 4 |
+
from src.genai.orchestration_agent.agent import orchestration_chat
|
| 5 |
+
from typing import Optional
|
| 6 |
+
|
| 7 |
+
class OrchestrationRequest(BaseModel):
|
| 8 |
+
message: str
|
| 9 |
+
image_base64 : Optional[list] = []
|
| 10 |
+
|
| 11 |
+
router= APIRouter()
|
| 12 |
+
|
| 13 |
+
@router.post("/orchestration")
|
| 14 |
+
def orchestration_endpoint(request:OrchestrationRequest):
|
| 15 |
+
print('Image:',request.image_base64)
|
| 16 |
+
result = orchestration_chat(request.message , request.image_base64)
|
| 17 |
+
if result.image_caption != '':
|
| 18 |
+
stored_data['image_caption']=result.image_caption
|
| 19 |
+
if result.video_idea !='' or result.video_idea != 'null':
|
| 20 |
+
stored_data['refined_ideation']= result.video_idea
|
| 21 |
+
if result.video_story!='' or result.video_story!='null':
|
| 22 |
+
stored_data['final_story']= result.video_story
|
| 23 |
+
print('Idea:',stored_data['refined_ideation'])
|
| 24 |
+
print('Story:', stored_data['final_story'])
|
| 25 |
+
|
| 26 |
+
return {'tool_response': result.tool ,
|
| 27 |
+
'message_response': result.query_response,
|
| 28 |
+
'image_caption':result.image_caption,
|
| 29 |
+
'video_idea': result.video_idea,
|
| 30 |
+
'video_story': result.video_story}
|
api/routers/show_analytics.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from fastapi import APIRouter
|
| 2 |
+
from api.stored_data import stored_data
|
| 3 |
+
from src.genai.orchestration_agent.utils.utils import show_analytics
|
| 4 |
+
|
| 5 |
+
router=APIRouter()
|
| 6 |
+
@router.post("/show-analytics")
|
| 7 |
+
def show_analytics_endpoint():
|
| 8 |
+
response = show_analytics(stored_data['business_details'])
|
| 9 |
+
return {'response': response}
|
api/stored_data.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
stored_data = {}
|
| 2 |
+
stored_data['business_details'] = {
|
| 3 |
+
"business_type": "fitness and gym",
|
| 4 |
+
"platform": "Instagram, TikTok",
|
| 5 |
+
"target_audience": "young Nepali adults (ages 18–40) who are health-conscious and active on social media",
|
| 6 |
+
"business_goals": "to expand gym branches across all major cities of Nepal and build a strong fitness community",
|
| 7 |
+
"offerings": "personal training, group fitness classes, modern workout equipment, nutrition guidance, and wellness programs",
|
| 8 |
+
"Challenges_faced": "attracting loyal members, standing out in a competitive market, and promoting consistent engagement"
|
| 9 |
+
}
|
| 10 |
+
stored_data['human_ideation_interactions'] = []
|
brainstroming_agent/__pycache__/__init__.cpython-312.pyc
DELETED
|
Binary file (176 Bytes)
|
|
|
brainstroming_agent/__pycache__/agent.cpython-312.pyc
DELETED
|
Binary file (1.38 kB)
|
|
|
brainstroming_agent/utils/__pycache__/__init__.cpython-312.pyc
DELETED
|
Binary file (182 Bytes)
|
|
|
brainstroming_agent/utils/__pycache__/business_interaction.cpython-312.pyc
DELETED
|
Binary file (5.25 kB)
|
|
|
brainstroming_agent/utils/__pycache__/check.cpython-312.pyc
DELETED
|
Binary file (4.69 kB)
|
|
|
brainstroming_agent/utils/__pycache__/data_loader.cpython-312.pyc
DELETED
|
Binary file (637 Bytes)
|
|
|
brainstroming_agent/utils/__pycache__/initial_interaction.cpython-312.pyc
DELETED
|
Binary file (4.17 kB)
|
|
|
brainstroming_agent/utils/__pycache__/models.cpython-312.pyc
DELETED
|
Binary file (933 Bytes)
|
|
|
brainstroming_agent/utils/__pycache__/models_loader.cpython-312.pyc
DELETED
|
Binary file (2.35 kB)
|
|
|
brainstroming_agent/utils/__pycache__/nodes.cpython-312.pyc
DELETED
|
Binary file (6.07 kB)
|
|
|
brainstroming_agent/utils/__pycache__/prompts.cpython-312.pyc
DELETED
|
Binary file (8.01 kB)
|
|
|
brainstroming_agent/utils/__pycache__/state.cpython-312.pyc
DELETED
|
Binary file (2.14 kB)
|
|
|
brainstroming_agent/utils/__pycache__/tools.cpython-312.pyc
DELETED
|
Binary file (2.74 kB)
|
|
|
brainstroming_agent/utils/__pycache__/utils.cpython-312.pyc
DELETED
|
Binary file (6.45 kB)
|
|
|
brainstroming_agent/utils/__pycache__/validators.cpython-312.pyc
DELETED
|
Binary file (698 Bytes)
|
|
|
business_interaction_agent/__pycache__/__init__.cpython-312.pyc
DELETED
|
Binary file (194 Bytes)
|
|
|
business_interaction_agent/__pycache__/agent.cpython-312.pyc
DELETED
|
Binary file (6.32 kB)
|
|
|
business_interaction_agent/utils/__pycache__/__init__.cpython-312.pyc
DELETED
|
Binary file (200 Bytes)
|
|
|
business_interaction_agent/utils/__pycache__/nodes.cpython-312.pyc
DELETED
|
Binary file (1.43 kB)
|
|
|
business_interaction_agent/utils/__pycache__/prompts.cpython-312.pyc
DELETED
|
Binary file (4.7 kB)
|
|
|
business_interaction_agent/utils/__pycache__/state.cpython-312.pyc
DELETED
|
Binary file (1.66 kB)
|
|
|
business_interaction_agent/utils/__pycache__/utils.cpython-312.pyc
DELETED
|
Binary file (3.02 kB)
|
|
|
context_analysis_agent/__pycache__/__init__.cpython-312.pyc
DELETED
|
Binary file (190 Bytes)
|
|
|
context_analysis_agent/__pycache__/agent.cpython-312.pyc
DELETED
|
Binary file (3.61 kB)
|
|
|
context_analysis_agent/utils/__pycache__/__init__.cpython-312.pyc
DELETED
|
Binary file (196 Bytes)
|
|
|
context_analysis_agent/utils/__pycache__/nodes.cpython-312.pyc
DELETED
|
Binary file (1.17 kB)
|
|
|
context_analysis_agent/utils/__pycache__/prompts.cpython-312.pyc
DELETED
|
Binary file (2.31 kB)
|
|
|
context_analysis_agent/utils/__pycache__/state.cpython-312.pyc
DELETED
|
Binary file (1.53 kB)
|
|
|
context_analysis_agent/utils/__pycache__/utils.cpython-312.pyc
DELETED
|
Binary file (1.83 kB)
|
|
|
ideation_agent/__pycache__/__init__.cpython-312.pyc
DELETED
|
Binary file (182 Bytes)
|
|
|
ideation_agent/__pycache__/agent.cpython-312.pyc
DELETED
|
Binary file (2.3 kB)
|
|
|
ideation_agent/utils/__pycache__/nodes.cpython-312.pyc
DELETED
|
Binary file (8.9 kB)
|
|
|
ideation_agent/utils/__pycache__/prompts.cpython-312.pyc
DELETED
|
Binary file (14.7 kB)
|
|
|
ideation_agent/utils/__pycache__/state.cpython-312.pyc
DELETED
|
Binary file (3.51 kB)
|
|
|
ideation_agent/utils/__pycache__/tools.cpython-312.pyc
DELETED
|
Binary file (3.06 kB)
|
|
|
main.py
CHANGED
|
@@ -1,20 +1,20 @@
|
|
| 1 |
from fastapi import FastAPI , UploadFile , File , Form
|
| 2 |
from fastapi.responses import JSONResponse
|
| 3 |
from pydantic import BaseModel
|
| 4 |
-
from brainstroming_agent.agent import brainstroming_graph
|
| 5 |
import pandas as pd
|
| 6 |
from typing import Optional , List
|
| 7 |
-
from context_analysis_agent.agent import IntroductionChatbot
|
| 8 |
-
from business_interaction_agent.agent import BusinessInteractionChatbot
|
| 9 |
-
from context_analysis_agent.utils.utils import save_to_db
|
| 10 |
import ast
|
| 11 |
-
from orchestration_agent.agent import orchestration_chat
|
| 12 |
-
from orchestration_agent.utils.utils import caption_image , show_analytics
|
| 13 |
-
from brainstroming_agent.utils.utils import encode_image_to_base64 , generate_final_story, generate_image
|
| 14 |
-
from idea_to_budget_agent.agent import budget_calculator
|
| 15 |
-
from ideation_agent.agent import ideation_graph
|
| 16 |
from langgraph.errors import GraphRecursionError
|
| 17 |
-
from human_refined_ideation.agent import human_refined_idea
|
| 18 |
from dummy_state import stored_data, long_term_memory
|
| 19 |
import json
|
| 20 |
|
|
|
|
| 1 |
from fastapi import FastAPI , UploadFile , File , Form
|
| 2 |
from fastapi.responses import JSONResponse
|
| 3 |
from pydantic import BaseModel
|
| 4 |
+
from src.genai.brainstroming_agent.agent import brainstroming_graph
|
| 5 |
import pandas as pd
|
| 6 |
from typing import Optional , List
|
| 7 |
+
from src.genai.context_analysis_agent.agent import IntroductionChatbot
|
| 8 |
+
from src.genai.business_interaction_agent.agent import BusinessInteractionChatbot
|
| 9 |
+
from src.genai.context_analysis_agent.utils.utils import save_to_db
|
| 10 |
import ast
|
| 11 |
+
from src.genai.orchestration_agent.agent import orchestration_chat
|
| 12 |
+
from src.genai.orchestration_agent.utils.utils import caption_image , show_analytics
|
| 13 |
+
from src.genai.brainstroming_agent.utils.utils import encode_image_to_base64 , generate_final_story, generate_image
|
| 14 |
+
from src.genai.idea_to_budget_agent.agent import budget_calculator
|
| 15 |
+
from src.genai.ideation_agent.agent import ideation_graph
|
| 16 |
from langgraph.errors import GraphRecursionError
|
| 17 |
+
from src.genai.human_refined_ideation.agent import human_refined_idea
|
| 18 |
from dummy_state import stored_data, long_term_memory
|
| 19 |
import json
|
| 20 |
|
requirements.txt
CHANGED
|
@@ -21,4 +21,4 @@ pandas
|
|
| 21 |
langchain-community
|
| 22 |
tiktoken
|
| 23 |
langchain-anthropic
|
| 24 |
-
|
|
|
|
| 21 |
langchain-community
|
| 22 |
tiktoken
|
| 23 |
langchain-anthropic
|
| 24 |
+
pytest
|