Skip to content

Commit

Permalink
app ecosystem necessary files
Browse files Browse the repository at this point in the history
Signed-off-by: Anupam Kumar <[email protected]>
  • Loading branch information
kyteinsky committed Oct 20, 2023
1 parent d8ca569 commit 8920768
Show file tree
Hide file tree
Showing 8 changed files with 867 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .nextcloudignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
.git
.github
.gitignore
.tx
.vscode
/.codecov.yml
/.env
/example.env
/.eslintrc.js
/.flake8
/.gitattributes
/.gitignore
/.l10nignore
/.nextcloudignore
/.travis.yml
/.pre-commit-config.yaml
/.run
/babel.config.js
/build
/APPS.md
/AUTHORS.md
/CHANGELOG.md
/HOW_TO_INSTALL.md
/README.md
/composer.*
/node_modules
/screenshots
/examples
/docs
/src
/vendor/bin
/jest.config.js
/Makefile
/krankerl.toml
/package-lock.json
/package.json
/postcss.config.js
/psalm.xml
/pyproject.toml
/renovate.json
/stylelint.config.js
/webpack.*
/requirements.txt
/reqs.txt
/Dockerfile
tests
__pycache__
32 changes: 32 additions & 0 deletions .run/cwyd_backend.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="CwydBackend" type="PythonConfigurationType" factoryName="Python">
<module name="cwyd_backend" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="AE_VERSION" value="1.0.0" />
<env name="APP_ID" value="cwyd_backend" />
<env name="APP_PERSISTENT_STORAGE" value="$USER_HOME$/cwyd_backend_files" />
<env name="APP_PORT" value="9001" />
<!-- <env name="APP_SECRET" value="12345" /> -->
<env name="APP_VERSION" value="1.0.0" />
<env name="NEXTCLOUD_URL" value="http://nextcloud.local" />
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="SDK_NAME" value="Python 3.11 (cwyd_backend)" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/src/main.py" />
<option name="PARAMETERS" value="-db weaviate -em hugging_face -lm llama" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<!-- <option name="INPUT_FILE" value="config.yaml" /> -->
<method v="2" />
</configuration>
</component>
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM python:3.11-bookworm

COPY reqs.txt /
ADD . .

RUN \
python3 -m pip install -r reqs.txt --no-deps && rm -rf ~/.cache

ENTRYPOINT [
"python3", "src/main.py",
"-db", "weaviate",
"-em", "hugging_face",
"-lm", "llama"
]
8 changes: 8 additions & 0 deletions HOW_TO_INSTALL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
How To Install
==============

1. Install **AppAPI** from [Appstore](https://apps.nextcloud.com/apps/app_api).
2. Create a deployment daemon following the [instructions](https://cloud-py-api.github.io/app_api/CreationOfDeployDaemon.html) provided by AppAPI. _(If you are using AIO, it will be created automatically)_
3. Navigate to the `External Apps` menu from your Nextcloud instance, find this example, and click the `Install` button.
4. Enable this bot in conversation settings.
5. Type in conversation: **@assistant I have a question for you**
Loading

0 comments on commit 8920768

Please sign in to comment.