Skip to content

Commit 2bac2b3

Browse files
author
Davidson Gomes
committed
chore: update author information and file names in multiple files
1 parent 3185233 commit 2bac2b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+736
-490
lines changed

conftest.py

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
"""
2+
┌──────────────────────────────────────────────────────────────────────────────┐
3+
│ @author: Davidson Gomes │
4+
│ @file: conftest.py │
5+
│ Developed by: Davidson Gomes │
6+
│ Creation date: May 13, 2025 │
7+
│ Contact: [email protected]
8+
├──────────────────────────────────────────────────────────────────────────────┤
9+
│ @copyright © Evolution API 2025. All rights reserved. │
10+
│ Licensed under the Apache License, Version 2.0 │
11+
│ │
12+
│ You may not use this file except in compliance with the License. │
13+
│ You may obtain a copy of the License at │
14+
│ │
15+
│ http://www.apache.org/licenses/LICENSE-2.0 │
16+
│ │
17+
│ Unless required by applicable law or agreed to in writing, software │
18+
│ distributed under the License is distributed on an "AS IS" BASIS, │
19+
│ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. │
20+
│ See the License for the specific language governing permissions and │
21+
│ limitations under the License. │
22+
├──────────────────────────────────────────────────────────────────────────────┤
23+
│ @important │
24+
│ For any future changes to the code in this file, it is recommended to │
25+
│ include, together with the modification, the information of the developer │
26+
│ who changed it and the date of modification. │
27+
└──────────────────────────────────────────────────────────────────────────────┘
28+
"""
29+
130
import pytest
231
from fastapi.testclient import TestClient
332
from sqlalchemy import create_engine
@@ -22,23 +51,23 @@
2251
def db_session():
2352
"""Creates a fresh database session for each test."""
2453
Base.metadata.create_all(bind=engine) # Create tables
25-
54+
2655
connection = engine.connect()
2756
transaction = connection.begin()
2857
session = TestingSessionLocal(bind=connection)
29-
58+
3059
# Use our test database instead of the standard one
3160
def override_get_db():
3261
try:
3362
yield session
3463
session.commit()
3564
finally:
3665
session.close()
37-
66+
3867
app.dependency_overrides[get_db] = override_get_db
39-
68+
4069
yield session # The test will run here
41-
70+
4271
# Teardown
4372
transaction.rollback()
4473
connection.close()
@@ -50,4 +79,4 @@ def override_get_db():
5079
def client(db_session):
5180
"""Creates a FastAPI TestClient with database session fixture."""
5281
with TestClient(app) as test_client:
53-
yield test_client
82+
yield test_client

scripts/seeders/admin_seeder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
┌──────────────────────────────────────────────────────────────────────────────┐
33
│ @author: Davidson Gomes │
4-
│ @file: run_seeders.py
4+
│ @file: admin_seeder.py │
55
│ Developed by: Davidson Gomes │
66
│ Creation date: May 13, 2025 │
77
│ Contact: [email protected]

scripts/seeders/client_seeder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
┌──────────────────────────────────────────────────────────────────────────────┐
33
│ @author: Davidson Gomes │
4-
│ @file: run_seeders.py
4+
│ @file: client_seeder.py │
55
│ Developed by: Davidson Gomes │
66
│ Creation date: May 13, 2025 │
77
│ Contact: [email protected]

scripts/seeders/mcp_server_seeder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
┌──────────────────────────────────────────────────────────────────────────────┐
33
│ @author: Davidson Gomes │
4-
│ @file: run_seeders.py
4+
│ @file: mcp_server_seeder.py │
55
│ Developed by: Davidson Gomes │
66
│ Creation date: May 13, 2025 │
77
│ Contact: [email protected]

scripts/seeders/tool_seeder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
┌──────────────────────────────────────────────────────────────────────────────┐
33
│ @author: Davidson Gomes │
4-
│ @file: run_seeders.py │
4+
│ @file: tool_seeder.py │
55
│ Developed by: Davidson Gomes │
66
│ Creation date: May 13, 2025 │
77
│ Contact: [email protected]

src/api/a2a_routes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
┌──────────────────────────────────────────────────────────────────────────────┐
33
│ @author: Davidson Gomes │
4-
│ @file: run_seeders.py │
4+
│ @file: a2a_routes.py
55
│ Developed by: Davidson Gomes │
66
│ Creation date: May 13, 2025 │
77
│ Contact: [email protected]

src/api/admin_routes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
┌──────────────────────────────────────────────────────────────────────────────┐
33
│ @author: Davidson Gomes │
4-
│ @file: run_seeders.py
4+
│ @file: admin_routes.py │
55
│ Developed by: Davidson Gomes │
66
│ Creation date: May 13, 2025 │
77
│ Contact: [email protected]

src/api/agent_routes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
┌──────────────────────────────────────────────────────────────────────────────┐
33
│ @author: Davidson Gomes │
4-
│ @file: run_seeders.py
4+
│ @file: agent_routes.py │
55
│ Developed by: Davidson Gomes │
66
│ Creation date: May 13, 2025 │
77
│ Contact: [email protected]

src/api/auth_routes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
┌──────────────────────────────────────────────────────────────────────────────┐
33
│ @author: Davidson Gomes │
4-
│ @file: run_seeders.py │
4+
│ @file: auth_routes.py │
55
│ Developed by: Davidson Gomes │
66
│ Creation date: May 13, 2025 │
77
│ Contact: [email protected]

src/api/chat_routes.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
┌──────────────────────────────────────────────────────────────────────────────┐
33
│ @author: Davidson Gomes │
4-
│ @file: run_seeders.py │
4+
│ @file: chat_routes.py │
55
│ Developed by: Davidson Gomes │
66
│ Creation date: May 13, 2025 │
77
│ Contact: [email protected]
@@ -84,8 +84,8 @@ async def websocket_chat(
8484
auth_data = await websocket.receive_json()
8585
logger.info(f"Received authentication data: {auth_data}")
8686

87-
if not auth_data.get("type") == "authorization" or not auth_data.get(
88-
"token"
87+
if not (
88+
auth_data.get("type") == "authorization" and auth_data.get("token")
8989
):
9090
logger.warning("Invalid authentication message")
9191
await websocket.close(code=status.WS_1008_POLICY_VIOLATION)
@@ -188,7 +188,7 @@ async def chat(
188188
await verify_user_client(payload, db, agent.client_id)
189189

190190
try:
191-
final_response_text = await run_agent(
191+
final_response = await run_agent(
192192
request.agent_id,
193193
request.external_id,
194194
request.message,
@@ -199,14 +199,15 @@ async def chat(
199199
)
200200

201201
return {
202-
"response": final_response_text,
202+
"response": final_response["final_response"],
203+
"message_history": final_response["message_history"],
203204
"status": "success",
204205
"timestamp": datetime.now().isoformat(),
205206
}
206207

207208
except AgentNotFoundError as e:
208-
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail=str(e))
209+
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail=str(e)) from e
209210
except Exception as e:
210211
raise HTTPException(
211212
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=str(e)
212-
)
213+
) from e

0 commit comments

Comments
 (0)