-
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.
* Align API endpoints; add instructions field * Fix API responses for GET agents, tools, and agencies lists. * Refactoring of the FastAPI dependencies * Refactor -> move objects to services * Refactor AgencyConfigStorage to remove agency_id from the constructor.
- Loading branch information
Showing
50 changed files
with
334 additions
and
227 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GATSBY_API_URL=http://127.0.0.1:8000/v1/api |
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 @@ | ||
GATSBY_API_URL=/v1/api |
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 |
---|---|---|
|
@@ -2,7 +2,5 @@ node_modules/ | |
.cache/ | ||
public/ | ||
|
||
.env.development | ||
.env.production | ||
|
||
package-lock.json | ||
yarn.lock |
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
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 |
---|---|---|
|
@@ -48,6 +48,7 @@ const Provider = ({ children }: any) => { | |
|
||
// Modify logic here to add your own authentication | ||
const initUser = { | ||
id: "test_user_id", | ||
name: "Guest User", | ||
email: "[email protected]", | ||
username: "guestuser", | ||
|
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,35 @@ | ||
from fastapi import Depends | ||
from redis import asyncio as aioredis | ||
|
||
from nalgonda.persistence.agent_config_firestore_storage import AgentConfigFirestoreStorage | ||
from nalgonda.services.agency_manager import AgencyManager | ||
from nalgonda.services.agent_manager import AgentManager | ||
from nalgonda.services.caching.redis_cache_manager import RedisCacheManager | ||
from nalgonda.services.thread_manager import ThreadManager | ||
from nalgonda.settings import settings | ||
|
||
|
||
def get_redis() -> aioredis.Redis: | ||
redis_url = str(settings.redis_tls_url or settings.redis_url) | ||
redis = aioredis.from_url(redis_url, decode_responses=False, ssl_cert_reqs="none") | ||
return redis | ||
|
||
|
||
def get_redis_cache_manager(redis: aioredis.Redis = Depends(get_redis)) -> RedisCacheManager: | ||
return RedisCacheManager(redis) | ||
|
||
|
||
def get_agent_manager(storage: AgentConfigFirestoreStorage = Depends(AgentConfigFirestoreStorage)) -> AgentManager: | ||
return AgentManager(storage) | ||
|
||
|
||
def get_agency_manager( | ||
cache_manager: RedisCacheManager = Depends(get_redis_cache_manager), | ||
agent_manager: AgentManager = Depends(get_agent_manager), | ||
) -> AgencyManager: | ||
return AgencyManager(cache_manager, agent_manager) | ||
|
||
|
||
def get_thread_manager() -> ThreadManager: | ||
"""Returns a ThreadManager object""" | ||
return ThreadManager() |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.