-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Changelog ## [0.0.1a9](https://github.com/NeonGeckoCom/neon-hana/tree/0.0.1a9) (2024-02-26) [Full Changelog](0.0.1a8...0.0.1a9) **Merged pull requests:** - Cleanup comments and prep for release [\#13](#13) ([NeonDaniel](https://github.com/NeonDaniel)) ## [0.0.1a8](https://github.com/NeonGeckoCom/neon-hana/tree/0.0.1a8) (2024-01-26) [Full Changelog](0.0.1a7...0.0.1a8) **Merged pull requests:** - Update to use client-provided public IP address when available [\#12](#12) ([NeonDaniel](https://github.com/NeonDaniel)) ## [0.0.1a7](https://github.com/NeonGeckoCom/neon-hana/tree/0.0.1a7) (2024-01-26) [Full Changelog](0.0.1a6...0.0.1a7) **Merged pull requests:** - Add Node data model and Session support [\#11](#11) ([NeonDaniel](https://github.com/NeonDaniel)) ## [0.0.1a6](https://github.com/NeonGeckoCom/neon-hana/tree/0.0.1a6) (2024-01-26) [Full Changelog](0.0.1a5...0.0.1a6) **Merged pull requests:** - Configurable Authorization Request Limits [\#9](#9) ([NeonDaniel](https://github.com/NeonDaniel)) ## [0.0.1a5](https://github.com/NeonGeckoCom/neon-hana/tree/0.0.1a5) (2024-01-23) [Full Changelog](0.0.1a4...0.0.1a5) **Merged pull requests:** - JWT server cache fix and client response update [\#8](#8) ([NeonDaniel](https://github.com/NeonDaniel)) ## [0.0.1a4](https://github.com/NeonGeckoCom/neon-hana/tree/0.0.1a4) (2024-01-22) [Full Changelog](0.0.1a3...0.0.1a4) **Merged pull requests:** - Default disable email service with note in docs explaining rationale [\#4](#4) ([NeonDaniel](https://github.com/NeonDaniel)) ## [0.0.1a3](https://github.com/NeonGeckoCom/neon-hana/tree/0.0.1a3) (2024-01-22) [Full Changelog](0.0.1a2...0.0.1a3) **Merged pull requests:** - Add `assist` route for HTTP requests [\#3](#3) ([NeonDaniel](https://github.com/NeonDaniel)) ## [0.0.1a2](https://github.com/NeonGeckoCom/neon-hana/tree/0.0.1a2) (2024-01-19) [Full Changelog](885ec6e...0.0.1a2) **Merged pull requests:** - Fix path errors in test build automation [\#2](#2) ([NeonDaniel](https://github.com/NeonDaniel)) - Initial Implementation [\#1](#1) ([NeonDaniel](https://github.com/NeonDaniel)) \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
- Loading branch information
Showing
38 changed files
with
4,325 additions
and
0 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,12 @@ | ||
name: Run License Tests | ||
on: | ||
push: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
license_tests: | ||
uses: neongeckocom/.github/.github/workflows/license_tests.yml@master | ||
with: | ||
packages-exclude: '^(neon-hana|dnspython).*' |
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,28 @@ | ||
name: Propose Stable Release | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release_type: | ||
type: choice | ||
description: Release Type | ||
options: | ||
- patch | ||
- minor | ||
- major | ||
jobs: | ||
update_version: | ||
uses: neongeckocom/.github/.github/workflows/propose_semver_release.yml@master | ||
with: | ||
branch: dev | ||
release_type: ${{ inputs.release_type }} | ||
update_changelog: True | ||
version_file: "neon_hana/version.py" | ||
pull_changes: | ||
uses: neongeckocom/.github/.github/workflows/pull_master.yml@master | ||
needs: update_version | ||
with: | ||
pr_reviewer: neonreviewers | ||
pr_assignee: ${{ github.actor }} | ||
pr_draft: false | ||
pr_title: ${{ needs.update_version.outputs.version }} | ||
pr_body: ${{ needs.update_version.outputs.changelog }} |
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,25 @@ | ||
# This workflow will generate a release distribution and upload it to PyPI | ||
|
||
name: Publish Build and GitHub Release | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
tag_release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Get Version | ||
run: | | ||
VERSION=$(python setup.py --version) | ||
echo "VERSION=${VERSION}" >> $GITHUB_ENV | ||
- uses: ncipollo/release-action@v1 | ||
with: | ||
token: ${{secrets.GITHUB_TOKEN}} | ||
tag: ${{env.VERSION}} | ||
generateReleaseNotes: true | ||
build_and_publish_docker: | ||
uses: neongeckocom/.github/.github/workflows/publish_docker.yml@master | ||
secrets: inherit |
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,22 @@ | ||
# This workflow will generate a distribution and upload it to PyPI | ||
|
||
name: Publish Alpha Build | ||
on: | ||
push: | ||
branches: | ||
- dev | ||
paths-ignore: | ||
- 'neon_hana/version.py' | ||
|
||
jobs: | ||
publish_alpha_release: | ||
uses: neongeckocom/.github/.github/workflows/publish_alpha_release.yml@master | ||
secrets: inherit | ||
with: | ||
version_file: "neon_hana/version.py" | ||
publish_prerelease: true | ||
publish_pypi: false | ||
build_and_publish_docker: | ||
needs: publish_alpha_release | ||
uses: neongeckocom/.github/.github/workflows/publish_docker.yml@master | ||
secrets: inherit |
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,29 @@ | ||
name: Run Unit Tests | ||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
py_build_tests: | ||
uses: neongeckocom/.github/.github/workflows/python_build_tests.yml@master | ||
with: | ||
python_version: "3.9" | ||
unit_tests: | ||
strategy: | ||
matrix: | ||
python-version: [ 3.9, "3.10", "3.11" ] | ||
timeout-minutes: 15 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install . -r requirements/test_requirements.txt | ||
- name: Run Tests | ||
run: | | ||
pytest tests |
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,70 @@ | ||
# Changelog | ||
|
||
## [0.0.1a9](https://github.com/NeonGeckoCom/neon-hana/tree/0.0.1a9) (2024-02-26) | ||
|
||
[Full Changelog](https://github.com/NeonGeckoCom/neon-hana/compare/0.0.1a8...0.0.1a9) | ||
|
||
**Merged pull requests:** | ||
|
||
- Cleanup comments and prep for release [\#13](https://github.com/NeonGeckoCom/neon-hana/pull/13) ([NeonDaniel](https://github.com/NeonDaniel)) | ||
|
||
## [0.0.1a8](https://github.com/NeonGeckoCom/neon-hana/tree/0.0.1a8) (2024-01-26) | ||
|
||
[Full Changelog](https://github.com/NeonGeckoCom/neon-hana/compare/0.0.1a7...0.0.1a8) | ||
|
||
**Merged pull requests:** | ||
|
||
- Update to use client-provided public IP address when available [\#12](https://github.com/NeonGeckoCom/neon-hana/pull/12) ([NeonDaniel](https://github.com/NeonDaniel)) | ||
|
||
## [0.0.1a7](https://github.com/NeonGeckoCom/neon-hana/tree/0.0.1a7) (2024-01-26) | ||
|
||
[Full Changelog](https://github.com/NeonGeckoCom/neon-hana/compare/0.0.1a6...0.0.1a7) | ||
|
||
**Merged pull requests:** | ||
|
||
- Add Node data model and Session support [\#11](https://github.com/NeonGeckoCom/neon-hana/pull/11) ([NeonDaniel](https://github.com/NeonDaniel)) | ||
|
||
## [0.0.1a6](https://github.com/NeonGeckoCom/neon-hana/tree/0.0.1a6) (2024-01-26) | ||
|
||
[Full Changelog](https://github.com/NeonGeckoCom/neon-hana/compare/0.0.1a5...0.0.1a6) | ||
|
||
**Merged pull requests:** | ||
|
||
- Configurable Authorization Request Limits [\#9](https://github.com/NeonGeckoCom/neon-hana/pull/9) ([NeonDaniel](https://github.com/NeonDaniel)) | ||
|
||
## [0.0.1a5](https://github.com/NeonGeckoCom/neon-hana/tree/0.0.1a5) (2024-01-23) | ||
|
||
[Full Changelog](https://github.com/NeonGeckoCom/neon-hana/compare/0.0.1a4...0.0.1a5) | ||
|
||
**Merged pull requests:** | ||
|
||
- JWT server cache fix and client response update [\#8](https://github.com/NeonGeckoCom/neon-hana/pull/8) ([NeonDaniel](https://github.com/NeonDaniel)) | ||
|
||
## [0.0.1a4](https://github.com/NeonGeckoCom/neon-hana/tree/0.0.1a4) (2024-01-22) | ||
|
||
[Full Changelog](https://github.com/NeonGeckoCom/neon-hana/compare/0.0.1a3...0.0.1a4) | ||
|
||
**Merged pull requests:** | ||
|
||
- Default disable email service with note in docs explaining rationale [\#4](https://github.com/NeonGeckoCom/neon-hana/pull/4) ([NeonDaniel](https://github.com/NeonDaniel)) | ||
|
||
## [0.0.1a3](https://github.com/NeonGeckoCom/neon-hana/tree/0.0.1a3) (2024-01-22) | ||
|
||
[Full Changelog](https://github.com/NeonGeckoCom/neon-hana/compare/0.0.1a2...0.0.1a3) | ||
|
||
**Merged pull requests:** | ||
|
||
- Add `assist` route for HTTP requests [\#3](https://github.com/NeonGeckoCom/neon-hana/pull/3) ([NeonDaniel](https://github.com/NeonDaniel)) | ||
|
||
## [0.0.1a2](https://github.com/NeonGeckoCom/neon-hana/tree/0.0.1a2) (2024-01-19) | ||
|
||
[Full Changelog](https://github.com/NeonGeckoCom/neon-hana/compare/885ec6ef0f8ddcaa8127f60730ef7b4011127554...0.0.1a2) | ||
|
||
**Merged pull requests:** | ||
|
||
- Fix path errors in test build automation [\#2](https://github.com/NeonGeckoCom/neon-hana/pull/2) ([NeonDaniel](https://github.com/NeonDaniel)) | ||
- Initial Implementation [\#1](https://github.com/NeonGeckoCom/neon-hana/pull/1) ([NeonDaniel](https://github.com/NeonDaniel)) | ||
|
||
|
||
|
||
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* |
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,16 @@ | ||
FROM python:3.9-slim | ||
|
||
LABEL vendor=neon.ai \ | ||
ai.neon.name="neon-hana" | ||
|
||
ENV OVOS_CONFIG_BASE_FOLDER neon | ||
ENV OVOS_CONFIG_FILENAME diana.yaml | ||
ENV XDG_CONFIG_HOME /config | ||
|
||
COPY docker_overlay/ / | ||
|
||
WORKDIR /app | ||
COPY . /app | ||
RUN pip install /app | ||
|
||
CMD ["python3", "/app/neon_hana/app/__main__.py"] |
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 @@ | ||
# NEON AI (TM) SOFTWARE, Software Development Kit & Application Development System | ||
# All trademark and other rights reserved by their respective owners | ||
# Copyright 2008-2021 Neongecko.com Inc. | ||
# BSD-3 | ||
|
||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the | ||
following conditions are met: | ||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following | ||
disclaimer. | ||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following | ||
disclaimer in the documentation and/or other materials provided with the distribution. | ||
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products | ||
derived from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, | ||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
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,47 @@ | ||
# HANA | ||
HANA (HTTP API for Neon Applications) provides a unified front-end for | ||
accessing services in a [Neon DIANA](https://github.com/NeonGeckoCom/neon-diana-utils) deployment. This API should generally | ||
be hosted as part of a Diana deployment to safely expose services to outside | ||
traffic. | ||
|
||
Full API documentation is automatically generated and accessible at `/docs`. | ||
|
||
## Configuration | ||
User configuration belongs in `diana.yaml`, mounted in the container path | ||
`/config/neon/`. An example user configuration could be: | ||
```yaml | ||
MQ: | ||
server: mq.mydomain.com | ||
hana: | ||
mq_default_timeout: 10 | ||
access_token_ttl: 86400 # 1 day | ||
refresh_token_ttl: 604800 # 1 week | ||
requests_per_minute: 60 | ||
auth_requests_per_minute: 6 # This counts valid and invalid requests from an IP address | ||
access_token_secret: a800445648142061fc238d1f84e96200da87f4f9fa7835cac90db8b4391b117b | ||
refresh_token_secret: 833d369ac73d883123743a44b4a7fe21203cffc956f4c8fec712e71aafa8e1aa | ||
fastapi_title: "My HANA API Host" | ||
fastapi_summary: "Personal HTTP API to access my DIANA backend." | ||
disable_auth: True | ||
stt_max_length_encoded: 500000 # Arbitrary limit that is larger than any expected voice command | ||
tts_max_words: 128 # Arbitrary limit that is longer than any default LLM token limit | ||
enable_email: True # Disabled by default; anyone with access to the API will be able to send emails from the configured address | ||
|
||
``` | ||
It is recommended to generate unique values for configured tokens, these are 32 | ||
bytes in hexadecimal representation. | ||
|
||
## Deployment | ||
You can build a Docker container from this repository, or pull a built container | ||
from the GitHub Container Registry. Start Hana via: | ||
```shell | ||
docker run -p 8080:8080 -v ~/.config/neon:/config/neon ghcr.io/neongeckocom/neon-hana | ||
``` | ||
> This assumes you have configuration defined in `~/.config/neon/diana.yaml` and | ||
are using the default port 8080 | ||
|
||
## Usage | ||
Full API documentation is available at `/docs`. The `/auth/login` endpoint should | ||
be used to generate a `client_id`, `access_token`, and `refresh_token`. The | ||
`access_token` should be included in every request and upon expiration of the | ||
`access_token`, a new token can be obtained from the `auth/refresh` endpoint. |
Empty file.
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,31 @@ | ||
log_level: INFO | ||
logs: | ||
level_overrides: | ||
error: | ||
- pika | ||
warning: | ||
- filelock | ||
info: | ||
- openai | ||
debug: [] | ||
MQ: | ||
server: neon-rabbitmq | ||
port: 5672 | ||
users: | ||
mq_handler: | ||
user: neon_api_utils | ||
password: Klatchat2021 | ||
hana: | ||
mq_default_timeout: 10 | ||
access_token_ttl: 86400 # 1 day | ||
refresh_token_ttl: 604800 # 1 week | ||
requests_per_minute: 60 | ||
access_token_secret: a800445648142061fc238d1f84e96200da87f4f9f784108ac90db8b4391b117b | ||
refresh_token_secret: 833d369ac73d883123743a44b4a7fe21203cffc956f4c8a99be6e71aafa8e1aa | ||
server_host: "0.0.0.0" | ||
server_port: 8080 | ||
fastapi_title: "Hana" | ||
fastapi_summary: "HANA (HTTP API for Neon Applications) is the HTTP component of the Device Independent API for Neon Applications (DIANA)" | ||
stt_max_length_encoded: 500000 | ||
tts_max_words: 128 | ||
enable_email: False |
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,25 @@ | ||
# NEON AI (TM) SOFTWARE, Software Development Kit & Application Development System | ||
# All trademark and other rights reserved by their respective owners | ||
# Copyright 2008-2021 Neongecko.com Inc. | ||
# BSD-3 | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are met: | ||
# 1. Redistributions of source code must retain the above copyright notice, | ||
# this list of conditions and the following disclaimer. | ||
# 2. Redistributions in binary form must reproduce the above copyright notice, | ||
# this list of conditions and the following disclaimer in the documentation | ||
# and/or other materials provided with the distribution. | ||
# 3. Neither the name of the copyright holder nor the names of its | ||
# contributors may be used to endorse or promote products derived from this | ||
# software without specific prior written permission. | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR | ||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, | ||
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
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,49 @@ | ||
# NEON AI (TM) SOFTWARE, Software Development Kit & Application Development System | ||
# All trademark and other rights reserved by their respective owners | ||
# Copyright 2008-2021 Neongecko.com Inc. | ||
# BSD-3 | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are met: | ||
# 1. Redistributions of source code must retain the above copyright notice, | ||
# this list of conditions and the following disclaimer. | ||
# 2. Redistributions in binary form must reproduce the above copyright notice, | ||
# this list of conditions and the following disclaimer in the documentation | ||
# and/or other materials provided with the distribution. | ||
# 3. Neither the name of the copyright holder nor the names of its | ||
# contributors may be used to endorse or promote products derived from this | ||
# software without specific prior written permission. | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR | ||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, | ||
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
from fastapi import FastAPI | ||
|
||
from neon_hana.app.dependencies import client_manager, jwt_bearer, mq_connector | ||
from neon_hana.app.routers.api_proxy import proxy_route | ||
from neon_hana.app.routers.assist import assist_route | ||
from neon_hana.app.routers.llm import llm_route | ||
from neon_hana.app.routers.mq_backend import mq_route | ||
from neon_hana.app.routers.auth import auth_route | ||
from neon_hana.version import __version__ | ||
|
||
|
||
def create_app(config: dict): | ||
title = config.get('fastapi_title') or "HANA: HTTP API for Neon Applications" | ||
summary = config.get('fastapi_summary') or "" | ||
version = __version__ | ||
app = FastAPI(title=title, summary=summary, version=version) | ||
app.include_router(auth_route) | ||
app.include_router(assist_route) | ||
app.include_router(proxy_route) | ||
app.include_router(mq_route) | ||
app.include_router(llm_route) | ||
|
||
return app |
Oops, something went wrong.