-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix tests; Add READMEs; Rename persistence->repos
- Loading branch information
Showing
35 changed files
with
183 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Nalgonda Project Overview | ||
|
||
The Nalgonda project is a comprehensive backend application designed to manage agencies, agents, and their interactions. | ||
It employs a variety of custom tools, data models, persistent storage mechanisms, backend services, | ||
external dependencies, and routed endpoints to deliver a fully functional system for agency management. | ||
|
||
## Directory Overview | ||
|
||
- **Custom Tools**: Contains tools for directory structure printing, proposal generation, file content printing, | ||
Airtable integration, web searching, code summarization, and program writing based on specific parameters. | ||
|
||
- **Models**: Defines data structures and logic for agency configurations, agent details, authentication, | ||
request handling, and tool configurations, ensuring data integrity and operation logic. | ||
|
||
- **Repositories**: Manages Firestore interactions for data storage and retrieval, | ||
implementing functionalities for agency and agent configurations, tool data, and user information management. | ||
|
||
- **Services**: Provides backend functionalities including agency and agent management, caching, | ||
real-time WebSocket communication, and threading. | ||
|
||
- **Dependencies**: Manages external service integrations and real-time communication necessities, | ||
including OAuth2 authentication, dependency injections, and WebSocket connections. | ||
|
||
- **Routers**: Orchestrates the application's request routing logic, handling API endpoint definitions | ||
across various versions and functionalities like agency operations, agent management, authentication, | ||
and session handling. | ||
|
||
This document serves to provide a broad overview of the project's structure and should be supplemented | ||
by reading the detailed README files within each directory for a comprehensive understanding | ||
of each component's functionality. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Custom Tools Directory | ||
|
||
This directory contains a collection of custom tools developed to extend the functionalities of the Nalgonda project. | ||
Each tool performs a specific task and can be called upon when needed. | ||
|
||
## Tools and Descriptions | ||
|
||
- **Build Directory Tree**: Prints the structure of directories and files within a specified directory | ||
while preventing directory traversal. | ||
|
||
- **Generate Proposal**: Generates a proposal for a project based on a project brief. | ||
Uses a GPT model to generate text based on input. | ||
|
||
- **Print File Contents**: Prints the contents of a specific file, preventing directory traversal. | ||
|
||
- **Save Lead to Airtable**: Saves new lead information to Airtable, including name, email, and lead details. | ||
|
||
- **Search Web**: Performs a web search and returns the results. It uses the `duckduckgo_search` library. | ||
|
||
- **Summarize Code**: Summarizes the code of a specified file using GPT-3. | ||
It relies on the `PrintFileContents` tool to access the code text. | ||
|
||
- **Utils**: Contains utility functions including directory traversal checks. | ||
|
||
- **Write and Save Program**: Writes and saves files that represent a program/application | ||
to the disk based on specified parameters. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Dependencies Directory | ||
|
||
This directory is crucial for managing the external dependencies and service interfaces used throughout the project. | ||
It contains: | ||
|
||
- `auth.py`: Handles user authentication and authorization with OAuth2, including JWT token management. | ||
- `dependencies.py`: Centralizes dependency injections for Redis, Agency, Agent, and Thread managers among others, | ||
ensuring modularity and ease of use. | ||
- `websocket_connection_manager.py`: Manages WebSocket connections enabling real-time communication in the application. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Models Directory | ||
|
||
This directory contains the data models used across the Nalgonda project. | ||
These models define the data structures, validation logic, and relationships between data entities. | ||
They are essential for the proper functioning of the application, ensuring data integrity and facilitating data operations. | ||
|
||
## Models and Descriptions | ||
|
||
- **AgencyConfig**: Represents the configuration of an agency, including identifiers, names, instructions, agents, and the agency chart. | ||
|
||
- **AgentConfig**: Defines the configuration for an individual agent, detailing identifiers, descriptions, instructions, and tools. | ||
|
||
- **ToolConfig**: Configures tools within the application, describing tool identifiers, names, versions, and approval status. | ||
|
||
- **Auth Models**: Includes models for token generation, user details, and authentication processes. | ||
|
||
- **Request Models**: Covers models for handling requests, specifically for threading and messaging within an agency. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Repositories Directory | ||
|
||
This directory is responsible for all persistent storage interactions within the Nalgonda project, | ||
particularly with Firestore. It contains implementations for storing, retrieving, and managing configurations | ||
and data for agencies, agents, tools, and users. | ||
|
||
## Files and Descriptions | ||
|
||
- **AgencyConfigFirestoreStorage.py**: Manages the persistence of agency configurations in Firestore, | ||
providing methods to load and save these configurations based on owner or agency IDs. | ||
|
||
- **AgentConfigFirestoreStorage.py**: Similar to its agency counterpart, this file handles the persistence | ||
of agent configurations, offering functionalities to load and save agent data. | ||
|
||
- **ToolConfigFirestoreStorage.py**: Facilitates storing and retrieving tool configurations in Firestore. | ||
This includes handling tool data validation and manipulation. | ||
|
||
- **UserRepository.py**: Manages user data within Firestore, including functions to retrieve and update user records. | ||
This setup reinforces the project's data integrity and provides a seamless integration with Firebase's Firestore | ||
for its storage needs. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Routers Directory | ||
|
||
This directory defines the API routing logic for the project, organizing routes into specific functionalities | ||
and versions. Key components include: | ||
|
||
- `__init__.py` & `v1/__init__.py`: Establish the application's routing logic, categorizing the APIs and handling errors. | ||
- `agency.py`, `agent.py`, `auth.py`, `session.py`, `tool.py`: Define the endpoints for managing agencies, agents, | ||
authentication, sessions, and tools, respectively. | ||
- `websocket.py`: Sets up WebSocket endpoints for real-time messaging. | ||
|
||
The Swagger documentation is available at `/v1/docs`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Services Directory | ||
|
||
This directory contains critical components that constitute the backend services of the Nalgonda project. | ||
These services enable various functionalities from managing entities like agencies and agents to handling caching, | ||
WebSocket connections, and threading. | ||
|
||
## Services and Descriptions | ||
|
||
- **Agency Manager**: Manages agencies and their configurations, including retrieval, update, and caching of agency information. | ||
|
||
- **Agent Manager**: Manages agents including creating, updating, and retrieving agent information. | ||
|
||
- **Cache Manager**: Defines an abstract base for cache management operations. | ||
|
||
- **Redis Cache Manager**: Implements cache management using Redis as the backend. | ||
|
||
- **Thread Manager**: Manages communication threads between agents within an agency, enabling threaded interactions. | ||
|
||
- **Tool Service**: Provides tool description generation using GPT-3. | ||
|
||
- **WebSocket Manager**: Manages WebSocket connections between the frontend and backend. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.