Spaces:
Sleeping
Sleeping
Commit
·
7cb0250
1
Parent(s):
c398d2b
Implemented imdb ideation
Browse files- logs/access.log +8 -0
- src/genai/brainstroming_agent/utils/__pycache__/tools.cpython-312.pyc +0 -0
- src/genai/ideation_agent/utils/__pycache__/nodes.cpython-312.pyc +0 -0
- src/genai/ideation_agent/utils/__pycache__/tools.cpython-312.pyc +0 -0
- src/genai/ideation_agent/utils/nodes.py +1 -1
- src/genai/ideation_agent/utils/tools.py +3 -3
- src/genai/orchestration_agent/utils/__pycache__/tools.cpython-312.pyc +0 -0
- src/genai/utils/__pycache__/load_embeddings.cpython-312.pyc +0 -0
logs/access.log
CHANGED
|
@@ -12,3 +12,11 @@
|
|
| 12 |
2025-07-30 16:40:01,763 | INFO | access_logger | Response status: 422
|
| 13 |
2025-07-30 16:53:21,510 | INFO | access_logger | Request: POST http://127.0.0.1:8000/api/show-analytics
|
| 14 |
2025-07-30 16:53:23,607 | INFO | access_logger | Response status: 200
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
2025-07-30 16:40:01,763 | INFO | access_logger | Response status: 422
|
| 13 |
2025-07-30 16:53:21,510 | INFO | access_logger | Request: POST http://127.0.0.1:8000/api/show-analytics
|
| 14 |
2025-07-30 16:53:23,607 | INFO | access_logger | Response status: 200
|
| 15 |
+
2025-08-07 22:11:57,149 | INFO | access_logger | Request: GET http://127.0.0.1:8000/docs
|
| 16 |
+
2025-08-07 22:11:57,199 | INFO | access_logger | Response status: 200
|
| 17 |
+
2025-08-07 22:11:57,518 | INFO | access_logger | Request: GET http://127.0.0.1:8000/openapi.json
|
| 18 |
+
2025-08-07 22:11:57,896 | INFO | access_logger | Response status: 200
|
| 19 |
+
2025-08-07 22:12:07,355 | INFO | access_logger | Request: POST http://127.0.0.1:8000/api/ideation
|
| 20 |
+
2025-08-07 22:13:07,112 | INFO | access_logger | Response status: 200
|
| 21 |
+
2025-08-07 22:19:53,508 | INFO | access_logger | Request: POST http://127.0.0.1:8000/api/ideation
|
| 22 |
+
2025-08-07 22:21:00,552 | INFO | access_logger | Response status: 200
|
src/genai/brainstroming_agent/utils/__pycache__/tools.cpython-312.pyc
CHANGED
|
Binary files a/src/genai/brainstroming_agent/utils/__pycache__/tools.cpython-312.pyc and b/src/genai/brainstroming_agent/utils/__pycache__/tools.cpython-312.pyc differ
|
|
|
src/genai/ideation_agent/utils/__pycache__/nodes.cpython-312.pyc
CHANGED
|
Binary files a/src/genai/ideation_agent/utils/__pycache__/nodes.cpython-312.pyc and b/src/genai/ideation_agent/utils/__pycache__/nodes.cpython-312.pyc differ
|
|
|
src/genai/ideation_agent/utils/__pycache__/tools.cpython-312.pyc
CHANGED
|
Binary files a/src/genai/ideation_agent/utils/__pycache__/tools.cpython-312.pyc and b/src/genai/ideation_agent/utils/__pycache__/tools.cpython-312.pyc differ
|
|
|
src/genai/ideation_agent/utils/nodes.py
CHANGED
|
@@ -29,8 +29,8 @@ def ideator(state:State):
|
|
| 29 |
The information of the image is:\n{state.image_caption[-1]}''')]
|
| 30 |
try:
|
| 31 |
response = ideator_agent.invoke({'messages':messages})
|
| 32 |
-
response = response['messages'][-1].content
|
| 33 |
print('Ideator Response:',response)
|
|
|
|
| 34 |
state.ideator_response.append(response)
|
| 35 |
print('Ideator Generated the story')
|
| 36 |
return state
|
|
|
|
| 29 |
The information of the image is:\n{state.image_caption[-1]}''')]
|
| 30 |
try:
|
| 31 |
response = ideator_agent.invoke({'messages':messages})
|
|
|
|
| 32 |
print('Ideator Response:',response)
|
| 33 |
+
response = response['messages'][-1].content
|
| 34 |
state.ideator_response.append(response)
|
| 35 |
print('Ideator Generated the story')
|
| 36 |
return state
|
src/genai/ideation_agent/utils/tools.py
CHANGED
|
@@ -11,7 +11,7 @@ from src.genai.utils.load_embeddings import caption_index , caption_df, ideas_i
|
|
| 11 |
from src.genai.utils.utils import clean_text
|
| 12 |
|
| 13 |
@tool("influencers_data_retrieval_tool", args_schema=QueryFormatter, return_direct=False,description="Retrieve influencer-related data for a given query.")
|
| 14 |
-
def
|
| 15 |
'''
|
| 16 |
Always invoke this tool.
|
| 17 |
Retrieve influencer's data by semantic search of **business details**.
|
|
@@ -68,7 +68,7 @@ def retrieve_tool(business_details):
|
|
| 68 |
distances, indices = ideas_index.search(query_embedding, top_k)
|
| 69 |
|
| 70 |
outer_list = []
|
| 71 |
-
for rank, (idx, sim) in enumerate(indices[0], 1):
|
| 72 |
row = ideas_df.iloc[idx]
|
| 73 |
res = {
|
| 74 |
'rank': rank,
|
|
@@ -76,7 +76,7 @@ def retrieve_tool(business_details):
|
|
| 76 |
}
|
| 77 |
|
| 78 |
inner_list = [
|
| 79 |
-
f"[{res['rank']}]
|
| 80 |
]
|
| 81 |
outer_list.append(inner_list)
|
| 82 |
|
|
|
|
| 11 |
from src.genai.utils.utils import clean_text
|
| 12 |
|
| 13 |
@tool("influencers_data_retrieval_tool", args_schema=QueryFormatter, return_direct=False,description="Retrieve influencer-related data for a given query.")
|
| 14 |
+
def retrieve_tool_old(business_details):
|
| 15 |
'''
|
| 16 |
Always invoke this tool.
|
| 17 |
Retrieve influencer's data by semantic search of **business details**.
|
|
|
|
| 68 |
distances, indices = ideas_index.search(query_embedding, top_k)
|
| 69 |
|
| 70 |
outer_list = []
|
| 71 |
+
for rank, (idx, sim) in enumerate(zip(indices[0], distances[0]), 1):
|
| 72 |
row = ideas_df.iloc[idx]
|
| 73 |
res = {
|
| 74 |
'rank': rank,
|
|
|
|
| 76 |
}
|
| 77 |
|
| 78 |
inner_list = [
|
| 79 |
+
f"Idea [{res['rank']}]: **{res['idea']}\n**",
|
| 80 |
]
|
| 81 |
outer_list.append(inner_list)
|
| 82 |
|
src/genai/orchestration_agent/utils/__pycache__/tools.cpython-312.pyc
CHANGED
|
Binary files a/src/genai/orchestration_agent/utils/__pycache__/tools.cpython-312.pyc and b/src/genai/orchestration_agent/utils/__pycache__/tools.cpython-312.pyc differ
|
|
|
src/genai/utils/__pycache__/load_embeddings.cpython-312.pyc
CHANGED
|
Binary files a/src/genai/utils/__pycache__/load_embeddings.cpython-312.pyc and b/src/genai/utils/__pycache__/load_embeddings.cpython-312.pyc differ
|
|
|