chore(examples): improve llama-index calling apis example #33
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant enhancements to the
examples/calling-apis/llama-index-examples
project, focusing on integrating federated authentication, improving agent functionality, and restructuring the codebase for better modularity and maintainability. The most important changes include the addition of federated connection tools, the introduction of an asynchronous agent with memory capabilities, and a comprehensive overhaul of the authentication and routing logic.Federated Authentication and Authorization:
auth0-server-python
integration to manage federated connections for Google Calendar, Slack, and GitHub, enabling scoped access to user data. (examples/calling-apis/llama-index-examples/pyproject.toml
,examples/calling-apis/llama-index-examples/src/auth0/auth.py
,examples/calling-apis/llama-index-examples/src/auth0/auth0_ai.py
) [1] [2] [3]auth0
routes for login, logout, and callback functionality, replacing the previousauthlib
-based implementation. (examples/calling-apis/llama-index-examples/src/auth0/routes.py
,examples/calling-apis/llama-index-examples/src/app/app.py
) [1] [2]Agent and Memory Enhancements:
get_agent
function usingOpenAIAgent
with integrated tools for Slack, GitHub, and Google Calendar, as well as asynchronous memory management viaChatMemoryBuffer
. (examples/calling-apis/llama-index-examples/src/agents/agent.py
,examples/calling-apis/llama-index-examples/src/agents/memory.py
) [1] [2]examples/calling-apis/llama-index-examples/src/agents/tools/list_channels.py
,examples/calling-apis/llama-index-examples/src/agents/tools/list_repositories.py
,examples/calling-apis/llama-index-examples/src/agents/tools/check_user_calendar.py
) [1] [2] [3]Codebase Restructuring:
examples/calling-apis/llama-index-examples/src/app/app.py
,examples/calling-apis/llama-index-examples/src/auth0/
) [1] [2]tools
into theagents
directory. (examples/calling-apis/llama-index-examples/src/agents/tools/check_user_calendar.py
)Asynchronous Application Improvements:
start.py
script to useasyncio.run
and converted the WSGI app to ASGI usingWsgiToAsgi
, enabling asynchronous server operation. (examples/calling-apis/llama-index-examples/scripts/start.py
)Development Environment Updates:
.vscode/settings.json
to updatepython.analysis.extraPaths
for better IDE support with the new project structure. (.vscode/settings.json
)