Skip to content

Commit

Permalink
Merge pull request #31 from RSS3-Network/feat/langgraph-support
Browse files Browse the repository at this point in the history
feat: langgraph support
  • Loading branch information
birdringxD authored Aug 5, 2024
2 parents 08c782b + 2fd998a commit 6bd1f6a
Show file tree
Hide file tree
Showing 125 changed files with 10,084 additions and 4,575 deletions.
2 changes: 1 addition & 1 deletion src/.chainlit/config.toml → .chainlit/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ hide_cot = false
# Specify a CSS file that can be used to customize the user interface.
# The CSS file can be served from the public directory or via an external link.
# custom_css = "/public/test.css"
custom_css = "/public/test.css"
custom_css = "/public/index.css"

# Specify a Javascript file that can be used to customize the user interface.
# The Javascript file can be served from the public directory.
Expand Down
File renamed without changes.
File renamed without changes.
34 changes: 34 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Database settings
DB_CONNECTION=postgresql+psycopg://postgres:password@vector_db:5432/openagent

# LLM provider settings (at least one required)
# To get a Google Cloud Vertex project ID, visit: https://console.cloud.google.com/vertex-ai
VERTEX_PROJECT_ID=your_google_cloud_vertex_project_id
# To get an OpenAI API key, sign up at: https://platform.openai.com/signup
OPENAI_API_KEY=your_openai_api_key
# To get a Google Gemini API key, visit: https://ai.google.dev
GOOGLE_GEMINI_API_KEY=your_google_gemini_api_key
# For Ollama, download and install from: https://github.com/ollama/ollama
OLLAMA_HOST=http://ollama:11434

# Optional API keys for additional features
# Sign up for NFTScan API key at: https://developer.nftscan.com/
NFTSCAN_API_KEY=your_nftscan_api_key
# Get your Tavily API key at: https://www.tavily.com/
TAVILY_API_KEY=your_tavily_api_key
# Get your Covalent API key at: https://www.covalenthq.com/platform/auth/register/
COVALENT_API_KEY=your_covalent_api_key
# Register for a RootData API key at: https://www.rootdata.com/
ROOTDATA_API_KEY=your_rootdata_api_key
# Sign up for a CoinGecko API key at: https://www.coingecko.com/en/api/pricing
COINGECKO_API_KEY=your_coingecko_api_key
# RSS3 API URLs (default values provided, change if needed)
RSS3_DATA_API=https://gi.rss3.io
RSS3_SEARCH_API=https://devnet.rss3.io/search

# Chainlit OAuth settings (all fields must be set if using OAuth, otherwise leave them empty)
# For Auth0 setup, visit: https://docs.chainlit.io/authentication/oauth
CHAINLIT_AUTH_SECRET=
OAUTH_AUTH0_CLIENT_ID=
OAUTH_AUTH0_CLIENT_SECRET=
OAUTH_AUTH0_DOMAIN=
2 changes: 1 addition & 1 deletion .github/workflows/build-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
id: build
uses: docker/build-push-action@v5
with:
context: ./src
context: .
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=rss3/openagent,push-by-digest=true,name-canonical=true,push=true
Expand Down
277 changes: 275 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,276 @@
.DS_Store
#map_cache
map_cache_*

.idea/
### VisualStudioCode template
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix

### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### dotenv template
.env

### Linux template
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

chainlit.md
### Python template
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
18 changes: 3 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,21 @@ repos:
rev: v4.4.0
hooks:
- id: check-ast
files: ^src/
- id: check-case-conflict
files: ^src/
- id: check-docstring-first
files: ^src/
- id: check-executables-have-shebangs
files: ^src/
- id: check-json
files: ^src/
- id: check-added-large-files
files: ^src/
- id: pretty-format-json
args:
- "--autofix"
- "--indent=4"
files: ^src/

- id: detect-private-key
files: ^src/
- id: debug-statements
files: ^src/
- id: end-of-file-fixer
files: ^src/
- id: trailing-whitespace
files: ^src/

- repo: local
hooks:
- id: mypy
Expand All @@ -35,20 +26,17 @@ repos:
require_serial: true
language: system
types: [ python ]
files: ^src/
pass_filenames: false
args: [--config-file=src/pyproject.toml]
args: [ --config-file=pyproject.toml ]
- id: ruff-lint
name: ruff-lint
entry: ruff check --fix
require_serial: true
language: system
files: ^src/
types: [ python ]
- id: ruff-format
name: ruff-format
entry: ruff format
require_serial: true
language: system
files: ^src/
types: [ python ]
File renamed without changes.
2 changes: 1 addition & 1 deletion OpenAgent.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions chainlit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# OpenAgent Framework

OpenAgent is a framework for building AI applications leveraging the power of blockchains and RSS3 Network.

For more information, please visit the [OpenAgent docs](https://docs.rss3.io/guide/artificial-intelligence/openagent).
File renamed without changes.
Loading

0 comments on commit 6bd1f6a

Please sign in to comment.