Merge branch 'main' into jan-182-drake

This commit is contained in:
drake 2023-09-29 14:55:18 +07:00
commit 8292172e48
521 changed files with 10454 additions and 18424 deletions

38
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: 'bug: [DESCRIPTION]'
labels: 'type: bug'
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

View File

@ -0,0 +1,14 @@
---
name: Discussion thread
about: Start an open ended discussion
title: 'Discussion: [TOPIC HERE]'
labels: ''
assignees: ''
---
**Motivation**
**Discussion**
**Resources**

20
.github/ISSUE_TEMPLATE/epic-request.md vendored Normal file
View File

@ -0,0 +1,20 @@
---
name: Epic request
about: Suggest an idea for this project
title: 'epic: [DESCRIPTION]'
labels: 'type: epic'
assignees: ''
---
**Problem**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Success Criteria**
A clear and concise description of what you want to happen.
**Sub Issues**
-
**Additional context**
Add any other context or screenshots about the epic request here.

View File

@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project
title: 'feat: [DESCRIPTION]'
labels: 'type: feature request'
assignees: ''
---
**Problem**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Success Criteria**
A clear and concise description of what you want to happen.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@ -1,53 +0,0 @@
name: Jan CI Production
on:
push:
tags: ['v*.*.*']
env:
REGISTRY: ghcr.io
HASURA_WORKER_IMAGE_NAME: ${{ github.repository }}/worker
WEB_CLIENT_IMAGE_NAME: ${{ github.repository }}/web-client
jobs:
build-docker-image:
runs-on: ubuntu-latest
environment: production
permissions:
contents: read
packages: write
steps:
- name: Getting the repo
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
# Build and docker image for app-backend worker
- name: Build docker image for app-backend worker
run: |
cd ./app-backend/worker
docker build -t ${{ env.REGISTRY }}/${{ env.HASURA_WORKER_IMAGE_NAME }}:${{ steps.tag.outputs.tag }} .
docker push ${{ env.REGISTRY }}/${{ env.HASURA_WORKER_IMAGE_NAME }}:${{ steps.tag.outputs.tag }}
# Get .env for FE
- name: Get .env file for build time
run: cd ./web-client && base64 -d <<< "$ENV_FILE_BASE64" > .env
shell: bash
env:
ENV_FILE_BASE64: ${{ secrets.ENV_FILE_BASE64 }}
# Build and push docker for web client
- name: Build docker image for web-client
run: |
cd ./web-client
docker build -t ${{ env.REGISTRY }}/${{ env.WEB_CLIENT_IMAGE_NAME }}:${{ steps.tag.outputs.tag }} .
docker push ${{ env.REGISTRY }}/${{ env.WEB_CLIENT_IMAGE_NAME }}:${{ steps.tag.outputs.tag }}

View File

@ -1,58 +0,0 @@
name: Jan CI Staging
on:
push:
branches:
- stag
paths:
- 'app-backend/worker/**' # hasura worker source code
- 'web-client/**' # web client source code
env:
REGISTRY: ghcr.io
HASURA_WORKER_IMAGE_NAME: ${{ github.repository }}/worker
WEB_CLIENT_IMAGE_NAME: ${{ github.repository }}/web-client
jobs:
build-docker-image:
runs-on: ubuntu-latest
environment: staging
permissions:
contents: read
packages: write
steps:
- name: Getting the repo
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y.%m.%d')"
# Build docker image for app-backend worker
- name: Build docker image for app-backend worker
if: ${{ contains(github.event.head_commit.added, 'app-backend/worker/') }}
run: |
cd ./app-backend/worker
docker build -t ${{ env.REGISTRY }}/${{ env.HASURA_WORKER_IMAGE_NAME }}:staging-${{ steps.date.outputs.date }}.${{github.run_number}} .
docker push ${{ env.REGISTRY }}/${{ env.HASURA_WORKER_IMAGE_NAME }}:staging-${{ steps.date.outputs.date }}.${{github.run_number}}
# Get .env for FE
- name: Get .env file for build time
run: cd ./web-client && base64 -d <<< "$ENV_FILE_BASE64" > .env
shell: bash
env:
ENV_FILE_BASE64: ${{ secrets.ENV_FILE_BASE64 }}
# Build and push docker for web client
- name: Build docker image for web-client
if: ${{ contains(github.event.head_commit.added, 'web-client/') }}
run: |
cd ./web-client
docker build -t ${{ env.REGISTRY }}/${{ env.WEB_CLIENT_IMAGE_NAME }}:staging-${{ steps.date.outputs.date }}.${{github.run_number}} .
docker push ${{ env.REGISTRY }}/${{ env.WEB_CLIENT_IMAGE_NAME }}:staging-${{ steps.date.outputs.date }}.${{github.run_number}}

View File

@ -19,8 +19,8 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
cache-dependency-path: './docs/package-lock.json'
cache: 'yarn'
cache-dependency-path: './docs/yarn.lock'
- name: Install dependencies
run: yarn install
@ -30,7 +30,7 @@ jobs:
working-directory: docs
- name: Add Custome Domain file
run: echo "docs.jan.ai" > ./docs/build/CNAME
run: echo "${{ vars.DOCUSAURUS_DOMAIN }}" > ./docs/build/CNAME
# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus

50
.github/workflows/macos-build-app.yml vendored Normal file
View File

@ -0,0 +1,50 @@
name: Jan Build MacOS App
on:
push:
tags: ['v*.*.*']
jobs:
build-macos-app:
runs-on: macos-latest
permissions:
contents: write
steps:
- name: Getting the repo
uses: actions/checkout@v3
- name: Installing node
uses: actions/setup-node@v1
with:
node-version: 20
- name: Install jq
uses: dcarbone/install-jq-action@v2.0.1
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
- name: Update app version base on tag
run: |
if [[ ! "${VERSION_TAG}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Error: Tag is not valid!"
exit 1
fi
jq --arg version "${VERSION_TAG#v}" '.version = $version' electron/package.json > /tmp/package.json
mv /tmp/package.json electron/package.json
env:
VERSION_TAG: ${{ steps.tag.outputs.tag }}
- name: Install yarn dependencies
run: |
yarn install
yarn build:plugins
- name: Build and publish app
run: |
yarn build:publish
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

8
.gitignore vendored
View File

@ -4,3 +4,11 @@
# Jan inference
models/**
error.log
node_modules
package-lock.json
*.tgz
yarn.lock
dist
build
.DS_Store
electron/renderer

28
KC.md
View File

@ -1,28 +0,0 @@
# Configuring Keycloak theme
Jan comes with a default theme for Keycloak. Extended from [Keywind](https://github.com/lukin/keywind)
## Select keywind as theme
1. Navigate to http://localhost:8088/admin
2. Sign in with below credentials
```
username: admin
password: admin
```
3. Select `hasura` from the top left dropdown box
![Screenshot 2023-09-06 at 15 10 53](https://github.com/janhq/jan/assets/10397206/5e3cf99b-7cd6-43ff-a003-e66aedd8c850)
4. Select `Realm settings` on left navigation bar and open tab `Themes`
![Screenshot 2023-09-06 at 15 14 05](https://github.com/janhq/jan/assets/10397206/3256b5c4-e3e7-48ef-9c5e-f720b5beeaa8)
5. On `Login theme` open the drop down box and select `keywind`
![Screenshot 2023-09-06 at 15 15 28](https://github.com/janhq/jan/assets/10397206/c52ba743-d978-4963-9311-cf84b4bb5389)
6. Save
**That's it!**
Open your web browser and navigate to `http://localhost:3000` to access Jan web application. Proceed to `Login` on the top right.
You should expect the theme as below. If it's does not, try to clear the cache from your browser.
![Screenshot 2023-09-06 at 15 29 09](https://github.com/janhq/jan/assets/10397206/a80a32e7-633f-4109-90fa-ec223c9d3b17)

244
README.md
View File

@ -1,4 +1,4 @@
# Jan - Self-Hosted AI Platform
# Jan - Run your own AI
<p align="center">
<img alt="janlogo" src="https://user-images.githubusercontent.com/69952136/266827788-b37d6f41-fc34-4677-aa1f-3e2ca6d3c91a.png">
@ -20,13 +20,14 @@
> ⚠️ **Jan is currently in Development**: Expect breaking changes and bugs!
Jan helps you run Local AI on your computer, with 1-click installs for the latest models. Easy-to-use yet powerful, with helpful tools to monitor and manage software-hardware performance.
Jan lets you run AI on your own hardware, with helpful tools to manage models and monitor your hardware performance.
Jan runs on a wide variety of hardware. We run on consumer-grade GPUs and Mac Minis, as well as datacenter-grade DGX H100 clusters.
In the background, Jan runs [Nitro](https://nitro.jan.ai), a C++ inference engine. It runs various model formats (GGUF/TensorRT) on various hardware (Mac M1/M2/Intel, Windows, Linux, and datacenter-grade Nvidia GPUs) with optional GPU acceleration.
Jan can be run as a server or cloud-native application for enterprise. We offer enterprise plugins for LDAP integration and Audit Logs. Contact us at [hello@jan.ai](mailto:hello@jan.ai) for more details.
> See the Nitro codebase at https://nitro.jan.ai.
Jan is free, [open core](https://en.wikipedia.org/wiki/Open-core_model), and licensed under a Sustainable Use License.
<!-- TODO: uncomment this later when we have this feature -->
<!-- Jan can be run as a server or cloud-native application for enterprise. We offer enterprise plugins for LDAP integration and Audit Logs. Contact us at [hello@jan.ai](mailto:hello@jan.ai) for more details. -->
## Demo
@ -34,208 +35,107 @@ Jan is free, [open core](https://en.wikipedia.org/wiki/Open-core_model), and lic
<img style='border:1px solid #000000' src="https://github.com/janhq/jan/assets/69952136/1f9bb48c-2e70-4633-9f68-7881cd925972" alt="Jan Web GIF">
</p>
## Features
## Quicklinks
**Self-Hosted AI**
- [x] Self-hosted Llama2 and LLMs
- [ ] Self-hosted StableDiffusion and Controlnet
- [ ] 1-click installs for Models (coming soon)
- Developer documentation: https://jan.ai/docs (Work in Progress)
- Desktop app: Download at https://jan.ai/
- Mobile app shell: Download via [App Store](https://apps.apple.com/us/app/jan-on-device-ai-cloud-ais/id6449664703) | [Android](https://play.google.com/store/apps/details?id=com.jan.ai)
- Nitro (C++ AI Engine): https://nitro.jan.ai
**3rd-party AIs**
- [ ] Connect to ChatGPT, Claude via API Key (coming soon)
- [ ] Security policy engine for 3rd-party AIs (coming soon)
- [ ] Pre-flight PII and Sensitive Data checks (coming soon)
## Plugins
**Multi-Device**
- [x] Web App
- [ ] Jan Mobile support for custom Jan server (in progress)
- [ ] Cloud deployments (coming soon)
Jan supports core & 3rd party extensions:
**Organization Tools**
- [x] Multi-user support
- [ ] Audit and Usage logs (coming soon)
- [ ] Compliance and Audit policy (coming soon)
- [x] **LLM chat**: Self-hosted Llama2 and LLMs
- [x] **Model Manager**: 1-click to install, swap, and delete models
- [x] **Storage**: Optionally store your conversation history and other data in SQLite/your storage of choice
- [ ] **3rd-party AIs**: Connect to ChatGPT, Claude via API Key (in progress)
- [ ] **Cross device support**: Mobile & Web support for custom shared servers (in progress)
- [ ] **File retrieval**: User can upload private and run a vectorDB (planned)
- [ ] **Multi-user support**: Share a single server across a team/friends (planned)
- [ ] **Compliance**: Auditing and flagging features (planned)
**Hardware Support**
## Hardware Support
- [x] Nvidia GPUs
- [x] Apple Silicon (in progress)
- [x] CPU support via llama.cpp
- [ ] Nvidia GPUs using TensorRT (in progress)
Nitro provides both CPU and GPU support, via [llama.cpp](https://github.com/ggerganov/llama.cpp) and [TensorRT](https://github.com/NVIDIA/TensorRT), respectively.
## Documentation
- [x] Nvidia GPUs (accelerated)
- [x] Apple M-series (accelerated)
- [x] Linux DEB
- [x] Windows x64
👋 https://docs.jan.ai (Work in Progress)
Not supported yet: Apple Intel, Linux RPM, Windows x86|ARM64, AMD ROCm
## Installation
> See [developer docs](https://docs.jan.ai/docs/) for detailed installation instructions.
> ⚠️ **Jan is currently in Development**: Expect breaking changes and bugs!
## Contributing
### Step 1: Install Docker
Contributions are welcome! Please read the [CONTRIBUTING.md](CONTRIBUTING.md) file
Jan is currently packaged as a Docker Compose application.
### Pre-requisites
- node >= 20.0.0
- yarn >= 1.22.0
- Docker ([Installation Instructions](https://docs.docker.com/get-docker/))
- Docker Compose ([Installation Instructions](https://docs.docker.com/compose/install/))
### Use as complete suite (in progress)
### For interactive development
### Step 2: Clone Repo
Note: This instruction is tested on MacOS only.
```bash
git clone https://github.com/janhq/jan.git
1. **Clone the Repository:**
```
git clone https://github.com/janhq/jan
git checkout feature/hackathon-refactor-jan-into-electron-app
cd jan
```
### Step 3: Configure `.env`
2. **Install dependencies:**
We provide a sample `.env` file that you can use to get started.
```
yarn install
```shell
cp sample.env .env
# Packing base plugins
yarn build:plugins
```
You will need to set the following `.env` variables
4. **Run development and Using Jan Desktop**
```shell
# TODO: Document .env variables
```
yarn dev
```
This will start the development server and open the desktop app.
In this step, there are a few notification about installing base plugin, just click `OK` and `Next` to continue.
### Step 4: Install Models
> Note: These step will change soon as we will be switching to [Nitro](https://github.com/janhq/nitro), an Accelerated Inference Server written in C++
#### Step 4.1: Install Mamba
> For complete Mambaforge installation instructions, see [miniforge repo](https://github.com/conda-forge/miniforge)
Install Mamba to handle native python binding (which can yield better performance on Mac M/ NVIDIA)
### For production build
```bash
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh"
bash Mambaforge-$(uname)-$(uname -m).sh
rm Mambaforge-$(uname)-$(uname -m).sh
# Do step 1 and 2 in previous section
git clone https://github.com/janhq/jan
cd jan
yarn install
yarn build:plugins
# Create environment
conda create -n jan python=3.9.16
conda activate jan
# Build the app
yarn build
```
Uninstall any previous versions of `llama-cpp-python`
```bash
pip uninstall llama-cpp-python -y
```
This will build the app MacOS m1/m2 for production (with code signing already done) and put the result in `dist` folder.
#### Step 4.2: Install `llama-cpp-python`
## License
> Note: This step will change soon once [Nitro](https://github.com/janhq/nitro) (our accelerated inference server written in C++) is released
Jan is free, [open core](https://en.wikipedia.org/wiki/Open-core_model), and Sustainable Use Licensed.
- On Mac
## Acknowledgements
```bash
# See https://github.com/abetlen/llama-cpp-python/blob/main/docs/install/macos.md
CMAKE_ARGS="-DLLAMA_METAL=on" FORCE_CMAKE=1 pip install -U llama-cpp-python --no-cache-dir
pip install 'llama-cpp-python[server]'
```
- On Linux with NVIDIA GPU Hardware Acceleration
```bash
# See https://github.com/abetlen/llama-cpp-python#installation-with-hardware-acceleration
CMAKE_ARGS="-DLLAMA_CUBLAS=on" FORCE_CMAKE=1 pip install llama-cpp-python
pip install 'llama-cpp-python[server]'
```
- On Linux with Intel/ AMD CPU (support for AVX-2/ AVX-512)
```bash
CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" FORCE_CMAKE=1 pip install llama-cpp-python
pip install 'llama-cpp-python[server]'
```
We recommend that Llama2-7B (4-bit quantized) as a basic model to get started.
You will need to download the models to the `models` folder at root level.
```shell
# Downloads model (~4gb)
# Download time depends on your internet connection and HuggingFace's bandwidth
# In this part, please head over to any source contains `.gguf` format model - https://huggingface.co/models?search=gguf
wget https://huggingface.co/TheBloke/Llama-2-7B-GGUF/resolve/main/llama-2-7b.Q4_0.gguf -P models
```
- Run the model in host machine
```bash
# Please change the value of --model key as your corresponding model path
# The --n_gpu_layers 1 means using acclerator (can be Metal on Mac, NVIDIA GPU on on linux with NVIDIA GPU)
# This service will run at `http://localhost:8000` in host level
# The backend service inside docker compose will connect to this service by using `http://host.docker.internal:8000`
python3 -m llama_cpp.server --model models/llama-2-7b.Q4_0.gguf --n_gpu_layers 1
```
### Step 5: `docker compose up`
Jan utilizes Docker Compose to run all services:
```shell
docker compose up -d # Detached mode
```
The table below summarizes the services and their respective URLs and credentials.
| Service | Container Name | URL and Port | Credentials |
| ------------------------------------------------ | -------------------- | --------------------- | ---------------------------------------------------------------------------------- |
| Jan Web | jan-web-* | http://localhost:3000 | Set in `conf/keycloak_conf/example-realm.json` <br />- Default Username / Password |
| [Hasura](https://hasura.io) (Backend) | jan-graphql-engine-* | http://localhost:8080 | Set in `conf/sample.env_app-backend` <br /> - `HASURA_GRAPHQL_ADMIN_SECRET` |
| [Keycloak](https://www.keycloak.org/) (Identity) | jan-keycloak-* | http://localhost:8088 | Set in `.env` <br />- `KEYCLOAK_ADMIN` <br />- `KEYCLOAK_ADMIN_PASSWORD` | |
| PostgresDB | jan-postgres-* | http://localhost:5432 | Set in `.env` |
### Step 6: Configure Keycloak
- [ ] Refactor [Keycloak Instructions](KC.md) into main README.md
- [ ] Changing login theme
### Step 7: Use Jan
- Launch the web application via `http://localhost:3000`.
- Login with default user (username: `username`, password: `password`)
### Step 8: Deploying to Production
- [ ] TODO
## About Jan
Jan is a commercial company with a [Fair Code](https://faircode.io/) business model. This means that while we are open-source and can used for free, we require commercial licenses for specific use cases (e.g. hosting Jan as a service).
We are a team of engineers passionate about AI, productivity and the future of work. We are funded through consulting contracts and enterprise licenses. Feel free to reach out to us!
### Repo Structure
Jan comprises of several repositories:
| Repo | Purpose |
| ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Jan](https://github.com/janhq/jan) | AI Platform to run AI in the enterprise. Easy-to-use for users, and packed with useful organizational and compliance features. |
| [Jan Mobile](https://github.com/janhq/jan-react-native) | Mobile App that can be pointed to a custom Jan server. |
| [Nitro](https://github.com/janhq/nitro) | Inference Engine that runs AI on different types of hardware. Offers popular API formats (e.g. OpenAI, Clipdrop). Written in C++ for blazing fast performance |
### Architecture
Jan builds on top of several open-source projects:
Jan builds on top of other open-source projects:
- [llama.cpp](https://github.com/ggerganov/llama.cpp)
- [TensorRT](https://github.com/NVIDIA/TensorRT)
- [Keycloak Community](https://github.com/keycloak/keycloak) (Apache-2.0)
- [Hasura Community Edition](https://github.com/hasura/graphql-engine) (Apache-2.0)
We may re-evaluate this in the future, given different customer requirements.
## Contact
### Contributing
Contributions are welcome! Please read the [CONTRIBUTING.md](CONTRIBUTING.md) file for guidelines on how to contribute to this project.
Please note that Jan intends to build a sustainable business that can provide high quality jobs to its contributors. If you are excited about our mission and vision, please contact us to explore opportunities.
### Contact
- For support: please file a Github ticket
- For questions: join our Discord [here](https://discord.gg/FTk2MvZwJH)
- For long form inquiries: please email hello@jan.ai
- Bugs & requests: file a Github ticket
- For discussion: join our Discord [here](https://discord.gg/FTk2MvZwJH)
- For business inquiries: email hello@jan.ai
- For jobs: please email hr@jan.ai

View File

@ -1,4 +0,0 @@
.DS_Store
.env
.env_postgresql
worker/node_modules/.mf

View File

@ -1,59 +0,0 @@
## Jan Backend
A Hasura Data API Platform designed to provide APIs for client interaction with the Language Model (LLM) through chat or the generation of art using Stable Diffusion. It is encapsulated within a Docker container for easy local deployment
## Quickstart
1. Run docker up
```bash
docker compose up
```
2. Install [HasuraCLI](https://hasura.io/docs/latest/hasura-cli/overview/)
3. Open Hasura Console
```bash
cd hasura && hasura console
```
4. Apply Migration
```bash
hasura migrate apply
```
5. Apply Metadata
```bash
hasura metadata apply
```
6. Apply seeds
```bash
hasura seed apply
```
## Hasura One Click Deploy
Use this URL to deploy this app to Hasura Cloud
[![Hasura Deploy](https://hasura.io/deploy-button.svg)](https://cloud.hasura.io/deploy?github_repo=https://github.com/janhq/app-backend/&hasura_dir=/hasura)
[One-click deploy docs](https://hasura.io/docs/latest/getting-started/getting-started-cloud/)
## Modify schema & model
[Hasura Tutorials](https://hasura.io/docs/latest/resources/tutorials/index/)
## Events & Workers
Serverless function (Cloudflare worker) to stream llm message & update
Readmore about Hasura Events here:
> https://hasura.io/docs/latest/event-triggers/serverless/
## Deploy Worker
```bash
npx wrangler deploy
```
[Cloudflare Worker Guide](https://developers.cloudflare.com/workers/get-started/guide/)

View File

@ -1,52 +0,0 @@
version: "3.6"
services:
postgres:
image: postgres:13
restart: always
volumes:
- db_data:/var/lib/postgresql/data
env_file:
- .env_postgresql
graphql-engine:
image: hasura/graphql-engine:v2.31.0.cli-migrations-v3
ports:
- "8080:8080"
restart: always
env_file:
- .env
volumes:
- ./hasura/migrations:/migrations
- ./hasura/metadata:/metadata
depends_on:
data-connector-agent:
condition: service_healthy
data-connector-agent:
image: hasura/graphql-data-connector:v2.31.0
restart: always
ports:
- 8081:8081
environment:
QUARKUS_LOG_LEVEL: ERROR # FATAL, ERROR, WARN, INFO, DEBUG, TRACE
## https://quarkus.io/guides/opentelemetry#configuration-reference
QUARKUS_OPENTELEMETRY_ENABLED: "false"
## QUARKUS_OPENTELEMETRY_TRACER_EXPORTER_OTLP_ENDPOINT: http://jaeger:4317
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8081/api/v1/athena/health"]
interval: 5s
timeout: 10s
retries: 5
start_period: 5s
worker:
build:
context: ./worker
dockerfile: ./Dockerfile
restart: always
environment:
- "NODE_ENV=development"
volumes:
- ./worker:/worker
ports:
- "8787:8787"
volumes:
db_data:

View File

@ -1,7 +0,0 @@
version: 3
endpoint: http://localhost:8080
admin_secret: myadminsecretkey
metadata_directory: metadata
actions:
kind: synchronous
handler_webhook_baseurl: http://localhost:3000

View File

@ -1,20 +0,0 @@
type Mutation {
imageGeneration(
input: ImageGenerationInput!
): ImageGenerationOutput
}
input ImageGenerationInput {
prompt: String!
neg_prompt: String!
model: String!
seed: Int!
steps: Int!
width: Int!
height: Int!
}
type ImageGenerationOutput {
url: String!
}

View File

@ -1,33 +0,0 @@
actions:
- name: imageGeneration
definition:
kind: synchronous
handler: '{{HASURA_ACTION_STABLE_DIFFUSION_URL}}'
timeout: 1800
request_transform:
body:
action: transform
template: |-
{
"prompt": {{$body.input.input.prompt}},
"neg_prompt": {{$body.input.input.neg_prompt}},
"unet_model": {{$body.input.input.model}},
"seed": {{$body.input.input.seed}},
"steps": {{$body.input.input.steps}},
"width": {{$body.input.input.width}},
"height": {{$body.input.input.height}}
}
method: POST
query_params: {}
template_engine: Kriti
url: '{{$base_url}}/inferences/txt2img'
version: 2
permissions:
- role: user
custom_types:
enums: []
input_objects:
- name: ImageGenerationInput
objects:
- name: ImageGenerationOutput
scalars: []

View File

@ -1 +0,0 @@
[]

View File

@ -1 +0,0 @@
{}

View File

@ -1,11 +0,0 @@
dataconnector:
athena:
uri: http://data-connector-agent:8081/api/v1/athena
mariadb:
uri: http://data-connector-agent:8081/api/v1/mariadb
mysql8:
uri: http://data-connector-agent:8081/api/v1/mysql
oracle:
uri: http://data-connector-agent:8081/api/v1/oracle
snowflake:
uri: http://data-connector-agent:8081/api/v1/snowflake

View File

@ -1 +0,0 @@
[]

View File

@ -1,9 +0,0 @@
- name: jandb
kind: postgres
configuration:
connection_info:
database_url:
from_env: PG_DATABASE_URL
isolation_level: read-committed
use_prepared_statements: false
tables: "!include jandb/tables/tables.yaml"

View File

@ -1,43 +0,0 @@
table:
name: collection_products
schema: public
array_relationships:
- name: collections
using:
manual_configuration:
column_mapping:
collection_id: id
insertion_order: null
remote_table:
name: collections
schema: public
- name: products
using:
manual_configuration:
column_mapping:
product_id: id
insertion_order: null
remote_table:
name: products
schema: public
select_permissions:
- role: public
permission:
columns:
- created_at
- updated_at
- collection_id
- id
- product_id
filter: {}
comment: ""
- role: user
permission:
columns:
- created_at
- updated_at
- collection_id
- id
- product_id
filter: {}
comment: ""

View File

@ -1,36 +0,0 @@
table:
name: collections
schema: public
array_relationships:
- name: collection_products
using:
manual_configuration:
column_mapping:
id: collection_id
insertion_order: null
remote_table:
name: collection_products
schema: public
select_permissions:
- role: public
permission:
columns:
- slug
- description
- name
- created_at
- updated_at
- id
filter: {}
comment: ""
- role: user
permission:
columns:
- slug
- description
- name
- created_at
- updated_at
- id
filter: {}
comment: ""

View File

@ -1,68 +0,0 @@
table:
name: conversations
schema: public
object_relationships:
- name: conversation_product
using:
manual_configuration:
column_mapping:
product_id: id
insertion_order: null
remote_table:
name: products
schema: public
array_relationships:
- name: conversation_messages
using:
manual_configuration:
column_mapping:
id: conversation_id
insertion_order: null
remote_table:
name: messages
schema: public
insert_permissions:
- role: user
permission:
check:
user_id:
_eq: X-Hasura-User-Id
columns:
- last_image_url
- last_text_message
- product_id
- user_id
comment: ""
select_permissions:
- role: user
permission:
columns:
- last_image_url
- last_text_message
- user_id
- created_at
- updated_at
- id
- product_id
filter:
user_id:
_eq: X-Hasura-User-Id
comment: ""
update_permissions:
- role: user
permission:
columns:
- last_image_url
- last_text_message
filter:
user_id:
_eq: X-Hasura-User-Id
check: null
comment: ""
delete_permissions:
- role: user
permission:
filter:
user_id:
_eq: X-Hasura-User-Id
comment: ""

View File

@ -1,68 +0,0 @@
table:
name: message_medias
schema: public
object_relationships:
- name: media_message
using:
manual_configuration:
column_mapping:
message_id: id
insertion_order: null
remote_table:
name: messages
schema: public
insert_permissions:
- role: user
permission:
check:
media_message:
message_conversation:
user_id:
_eq: X-Hasura-User-Id
columns:
- media_url
- message_id
- mime_type
comment: ""
select_permissions:
- role: user
permission:
columns:
- mime_type
- media_url
- created_at
- updated_at
- id
- message_id
filter:
media_message:
message_conversation:
user_id:
_eq: X-Hasura-User-Id
comment: ""
update_permissions:
- role: user
permission:
columns:
- mime_type
- media_url
- created_at
- updated_at
- id
- message_id
filter:
media_message:
message_conversation:
user_id:
_eq: X-Hasura-User-Id
check: null
comment: ""
delete_permissions:
- role: user
permission:
filter:
media_message:
message_conversation:
user_id:
_eq: X-Hasura-User-Id
comment: ""

View File

@ -1,86 +0,0 @@
table:
name: messages
schema: public
object_relationships:
- name: message_conversation
using:
manual_configuration:
column_mapping:
conversation_id: id
insertion_order: null
remote_table:
name: conversations
schema: public
array_relationships:
- name: message_medias
using:
manual_configuration:
column_mapping:
id: message_id
insertion_order: null
remote_table:
name: message_medias
schema: public
insert_permissions:
- role: user
permission:
check:
message_conversation:
user_id:
_eq: X-Hasura-User-Id
columns:
- content
- conversation_id
- message_sender_type
- message_type
- prompt_cache
- sender
- sender_avatar_url
- sender_name
- status
comment: ""
select_permissions:
- role: user
permission:
columns:
- content
- conversation_id
- created_at
- id
- message_sender_type
- message_type
- sender
- sender_avatar_url
- sender_name
- status
- updated_at
filter:
message_conversation:
user_id:
_eq: X-Hasura-User-Id
comment: ""
update_permissions:
- role: user
permission:
columns:
- content
- message_sender_type
- message_type
- sender
- sender_avatar_url
- sender_name
- status
filter:
message_conversation:
user_id:
_eq: X-Hasura-User-Id
check: null
comment: ""
delete_permissions:
- role: user
permission:
filter:
message_conversation:
user_id:
_eq: X-Hasura-User-Id
comment: ""

View File

@ -1,43 +0,0 @@
table:
name: product_prompts
schema: public
array_relationships:
- name: products
using:
manual_configuration:
column_mapping:
product_id: id
insertion_order: null
remote_table:
name: products
schema: public
- name: prompts
using:
manual_configuration:
column_mapping:
prompt_id: id
insertion_order: null
remote_table:
name: prompts
schema: public
select_permissions:
- role: public
permission:
columns:
- created_at
- updated_at
- id
- product_id
- prompt_id
filter: {}
comment: ""
- role: user
permission:
columns:
- created_at
- updated_at
- id
- product_id
- prompt_id
filter: {}
comment: ""

View File

@ -1,65 +0,0 @@
table:
name: products
schema: public
array_relationships:
- name: product_collections
using:
manual_configuration:
column_mapping:
id: product_id
insertion_order: null
remote_table:
name: collection_products
schema: public
- name: product_prompts
using:
manual_configuration:
column_mapping:
id: product_id
insertion_order: null
remote_table:
name: product_prompts
schema: public
select_permissions:
- role: public
permission:
columns:
- nsfw
- slug
- inputs
- outputs
- author
- description
- greeting
- image_url
- long_description
- name
- source_url
- technical_description
- version
- created_at
- updated_at
- id
filter: {}
comment: ""
- role: user
permission:
columns:
- nsfw
- slug
- inputs
- outputs
- author
- description
- greeting
- image_url
- long_description
- name
- source_url
- technical_description
- version
- created_at
- updated_at
- id
filter: {}
comment: ""

View File

@ -1,36 +0,0 @@
table:
name: prompts
schema: public
array_relationships:
- name: prompt_products
using:
manual_configuration:
column_mapping:
id: prompt_id
insertion_order: null
remote_table:
name: product_prompts
schema: public
select_permissions:
- role: public
permission:
columns:
- slug
- content
- image_url
- created_at
- updated_at
- id
filter: {}
comment: ""
- role: user
permission:
columns:
- slug
- content
- image_url
- created_at
- updated_at
- id
filter: {}
comment: ""

View File

@ -1,8 +0,0 @@
- "!include public_collection_products.yaml"
- "!include public_collections.yaml"
- "!include public_conversations.yaml"
- "!include public_message_medias.yaml"
- "!include public_messages.yaml"
- "!include public_product_prompts.yaml"
- "!include public_products.yaml"
- "!include public_prompts.yaml"

View File

@ -1 +0,0 @@
disabled_for_roles: []

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
version: 3

View File

@ -1 +0,0 @@
DROP TABLE "public"."collections";

View File

@ -1,18 +0,0 @@
CREATE TABLE "public"."collections" ("id" uuid NOT NULL DEFAULT gen_random_uuid(), "slug" varchar NOT NULL, "name" text NOT NULL, "description" text NOT NULL, "created_at" timestamptz NOT NULL DEFAULT now(), "updated_at" timestamptz NOT NULL DEFAULT now(), PRIMARY KEY ("id") , UNIQUE ("slug"));
CREATE OR REPLACE FUNCTION "public"."set_current_timestamp_updated_at"()
RETURNS TRIGGER AS $$
DECLARE
_new record;
BEGIN
_new := NEW;
_new."updated_at" = NOW();
RETURN _new;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER "set_public_collections_updated_at"
BEFORE UPDATE ON "public"."collections"
FOR EACH ROW
EXECUTE PROCEDURE "public"."set_current_timestamp_updated_at"();
COMMENT ON TRIGGER "set_public_collections_updated_at" ON "public"."collections"
IS 'trigger to set value of column "updated_at" to current timestamp on row update';
CREATE EXTENSION IF NOT EXISTS pgcrypto;

View File

@ -1 +0,0 @@
DROP TABLE "public"."products";

View File

@ -1,18 +0,0 @@
CREATE TABLE "public"."products" ("id" uuid NOT NULL DEFAULT gen_random_uuid(), "slug" varchar NOT NULL, "name" text NOT NULL, "description" text, "image_url" text, "long_description" text, "technical_description" text, "author" text, "version" text, "source_url" text, "nsfw" boolean NOT NULL DEFAULT true, "greeting" text, "inputs" jsonb, "outputs" jsonb, "created_at" timestamptz NOT NULL DEFAULT now(), "updated_at" timestamptz NOT NULL DEFAULT now(), PRIMARY KEY ("id") , UNIQUE ("slug"));
CREATE OR REPLACE FUNCTION "public"."set_current_timestamp_updated_at"()
RETURNS TRIGGER AS $$
DECLARE
_new record;
BEGIN
_new := NEW;
_new."updated_at" = NOW();
RETURN _new;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER "set_public_products_updated_at"
BEFORE UPDATE ON "public"."products"
FOR EACH ROW
EXECUTE PROCEDURE "public"."set_current_timestamp_updated_at"();
COMMENT ON TRIGGER "set_public_products_updated_at" ON "public"."products"
IS 'trigger to set value of column "updated_at" to current timestamp on row update';
CREATE EXTENSION IF NOT EXISTS pgcrypto;

View File

@ -1 +0,0 @@
DROP TABLE "public"."prompts";

View File

@ -1,18 +0,0 @@
CREATE TABLE "public"."prompts" ("id" uuid NOT NULL DEFAULT gen_random_uuid(), "slug" varchar NOT NULL, "content" text, "image_url" text, "created_at" timestamptz NOT NULL DEFAULT now(), "updated_at" timestamptz NOT NULL DEFAULT now(), PRIMARY KEY ("id") , UNIQUE ("slug"));
CREATE OR REPLACE FUNCTION "public"."set_current_timestamp_updated_at"()
RETURNS TRIGGER AS $$
DECLARE
_new record;
BEGIN
_new := NEW;
_new."updated_at" = NOW();
RETURN _new;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER "set_public_prompts_updated_at"
BEFORE UPDATE ON "public"."prompts"
FOR EACH ROW
EXECUTE PROCEDURE "public"."set_current_timestamp_updated_at"();
COMMENT ON TRIGGER "set_public_prompts_updated_at" ON "public"."prompts"
IS 'trigger to set value of column "updated_at" to current timestamp on row update';
CREATE EXTENSION IF NOT EXISTS pgcrypto;

View File

@ -1 +0,0 @@
DROP TABLE "public"."conversations";

View File

@ -1,18 +0,0 @@
CREATE TABLE "public"."conversations" ("id" uuid NOT NULL DEFAULT gen_random_uuid(), "product_id" uuid NOT NULL, "user_id" Text NOT NULL, "last_image_url" text, "last_text_message" text, "created_at" timestamptz NOT NULL DEFAULT now(), "updated_at" timestamptz NOT NULL DEFAULT now(), PRIMARY KEY ("id") );
CREATE OR REPLACE FUNCTION "public"."set_current_timestamp_updated_at"()
RETURNS TRIGGER AS $$
DECLARE
_new record;
BEGIN
_new := NEW;
_new."updated_at" = NOW();
RETURN _new;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER "set_public_conversations_updated_at"
BEFORE UPDATE ON "public"."conversations"
FOR EACH ROW
EXECUTE PROCEDURE "public"."set_current_timestamp_updated_at"();
COMMENT ON TRIGGER "set_public_conversations_updated_at" ON "public"."conversations"
IS 'trigger to set value of column "updated_at" to current timestamp on row update';
CREATE EXTENSION IF NOT EXISTS pgcrypto;

View File

@ -1 +0,0 @@
DROP TABLE "public"."messages";

View File

@ -1,18 +0,0 @@
CREATE TABLE "public"."messages" ("id" uuid NOT NULL DEFAULT gen_random_uuid(), "conversation_id" uuid NOT NULL, "message_type" varchar, "message_sender_type" varchar, "sender" text NOT NULL, "sender_name" text, "sender_avatar_url" text, "content" text, "created_at" timestamptz NOT NULL DEFAULT now(), "updated_at" timestamptz NOT NULL DEFAULT now(), PRIMARY KEY ("id") );
CREATE OR REPLACE FUNCTION "public"."set_current_timestamp_updated_at"()
RETURNS TRIGGER AS $$
DECLARE
_new record;
BEGIN
_new := NEW;
_new."updated_at" = NOW();
RETURN _new;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER "set_public_messages_updated_at"
BEFORE UPDATE ON "public"."messages"
FOR EACH ROW
EXECUTE PROCEDURE "public"."set_current_timestamp_updated_at"();
COMMENT ON TRIGGER "set_public_messages_updated_at" ON "public"."messages"
IS 'trigger to set value of column "updated_at" to current timestamp on row update';
CREATE EXTENSION IF NOT EXISTS pgcrypto;

View File

@ -1 +0,0 @@
DROP TABLE "public"."message_medias";

View File

@ -1,18 +0,0 @@
CREATE TABLE "public"."message_medias" ("id" uuid NOT NULL DEFAULT gen_random_uuid(), "message_id" uuid NOT NULL, "media_url" text, "created_at" timestamptz NOT NULL DEFAULT now(), "updated_at" timestamptz NOT NULL DEFAULT now(), "mime_type" varchar, PRIMARY KEY ("id") );
CREATE OR REPLACE FUNCTION "public"."set_current_timestamp_updated_at"()
RETURNS TRIGGER AS $$
DECLARE
_new record;
BEGIN
_new := NEW;
_new."updated_at" = NOW();
RETURN _new;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER "set_public_message_medias_updated_at"
BEFORE UPDATE ON "public"."message_medias"
FOR EACH ROW
EXECUTE PROCEDURE "public"."set_current_timestamp_updated_at"();
COMMENT ON TRIGGER "set_public_message_medias_updated_at" ON "public"."message_medias"
IS 'trigger to set value of column "updated_at" to current timestamp on row update';
CREATE EXTENSION IF NOT EXISTS pgcrypto;

View File

@ -1 +0,0 @@
DROP TABLE "public"."collection_products";

View File

@ -1,18 +0,0 @@
CREATE TABLE "public"."collection_products" ("id" uuid NOT NULL DEFAULT gen_random_uuid(), "collection_id" uuid NOT NULL, "product_id" uuid NOT NULL, "created_at" timestamptz NOT NULL DEFAULT now(), "updated_at" timestamptz NOT NULL DEFAULT now(), PRIMARY KEY ("id") , UNIQUE ("collection_id", "product_id"));
CREATE OR REPLACE FUNCTION "public"."set_current_timestamp_updated_at"()
RETURNS TRIGGER AS $$
DECLARE
_new record;
BEGIN
_new := NEW;
_new."updated_at" = NOW();
RETURN _new;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER "set_public_collection_products_updated_at"
BEFORE UPDATE ON "public"."collection_products"
FOR EACH ROW
EXECUTE PROCEDURE "public"."set_current_timestamp_updated_at"();
COMMENT ON TRIGGER "set_public_collection_products_updated_at" ON "public"."collection_products"
IS 'trigger to set value of column "updated_at" to current timestamp on row update';
CREATE EXTENSION IF NOT EXISTS pgcrypto;

View File

@ -1 +0,0 @@
DROP TABLE "public"."product_prompts";

View File

@ -1,18 +0,0 @@
CREATE TABLE "public"."product_prompts" ("id" uuid NOT NULL DEFAULT gen_random_uuid(), "product_id" uuid NOT NULL, "prompt_id" uuid NOT NULL, "created_at" timestamptz NOT NULL DEFAULT now(), "updated_at" timestamptz NOT NULL DEFAULT now(), PRIMARY KEY ("id") , UNIQUE ("product_id", "prompt_id"));
CREATE OR REPLACE FUNCTION "public"."set_current_timestamp_updated_at"()
RETURNS TRIGGER AS $$
DECLARE
_new record;
BEGIN
_new := NEW;
_new."updated_at" = NOW();
RETURN _new;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER "set_public_product_prompts_updated_at"
BEFORE UPDATE ON "public"."product_prompts"
FOR EACH ROW
EXECUTE PROCEDURE "public"."set_current_timestamp_updated_at"();
COMMENT ON TRIGGER "set_public_product_prompts_updated_at" ON "public"."product_prompts"
IS 'trigger to set value of column "updated_at" to current timestamp on row update';
CREATE EXTENSION IF NOT EXISTS pgcrypto;

View File

@ -1 +0,0 @@
alter table "public"."collection_products" drop constraint "collection_products_collection_id_fkey";

View File

@ -1,5 +0,0 @@
alter table "public"."collection_products"
add constraint "collection_products_collection_id_fkey"
foreign key ("collection_id")
references "public"."collections"
("id") on update cascade on delete cascade;

View File

@ -1 +0,0 @@
alter table "public"."collection_products" drop constraint "collection_products_product_id_fkey";

View File

@ -1,5 +0,0 @@
alter table "public"."collection_products"
add constraint "collection_products_product_id_fkey"
foreign key ("product_id")
references "public"."products"
("id") on update cascade on delete cascade;

View File

@ -1 +0,0 @@
alter table "public"."messages" drop column "status";

View File

@ -1,2 +0,0 @@
alter table "public"."messages" add column "status" varchar
null default 'ready';

View File

@ -1 +0,0 @@
alter table "public"."messages" drop column "prompt_cache";

View File

@ -1,2 +0,0 @@
alter table "public"."messages" add column "prompt_cache" jsonb
null;

View File

@ -1 +0,0 @@
-- DO NOTHING WITH DATA MIGRATION DOWN

View File

@ -1,3 +0,0 @@
INSERT INTO public.products ("slug", "name", "nsfw", "image_url", "description", "long_description", "technical_description", "author", "version", "source_url", "inputs", "outputs", "greeting") VALUES
('llama2', 'Llama-2-7B-Chat', 't', 'https://static-assets.jan.ai/llama2.jpg','Llama 2 is Meta`s open source large language model (LLM)', 'Llama 2 is a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 70 billion parameters. This is the repository for the 7B pretrained model. Links to other models can be found in the index at the bottom.', 'Meta developed and publicly released the Llama 2 family of large language models (LLMs), a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 70 billion parameters. Our fine-tuned LLMs, called Llama-2-Chat, are optimized for dialogue use cases. Llama-2-Chat models outperform open-source chat models on most benchmarks we tested, and in our human evaluations for helpfulness and safety, are on par with some popular closed-source models like ChatGPT and PaLM.', 'Meta', 'Llama2-7B-GGML', 'https://huggingface.co/TheBloke/airoboros-13B-gpt4-1.4-GGML', '{"body": [{"name": "messages", "type": "array", "items": [{"type": "object", "properties": [{"name": "role", "type": "string", "example": "system", "description": "Defines the role of the message."}, {"name": "content", "type": "string", "example": "Hello, world!", "description": "Contains the content of the message."}]}], "description": "An array of messages, each containing a role and content. The latest message is always at the end of the array."}, {"name": "stream", "type": "boolean", "example": true, "description": "Indicates whether the client wants to keep the connection open for streaming."}, {"name": "max_tokens", "type": "integer", "example": 500, "description": "Defines the maximum number of tokens that the client wants to receive."}], "slug": "llm", "headers": {"accept": "text/event-stream", "content-type": "application/json"}}', '{"slug": "llm", "type": "object", "properties": [{"name": "id", "type": "string", "example": "chatcmpl-4c4e5eb5-bf53-4dbc-9136-1cf69fc5fd7c", "description": "The unique identifier of the chat completion chunk."}, {"name": "model", "type": "string", "example": "gpt-3.5-turbo", "description": "The name of the GPT model used to generate the completion."}, {"name": "created", "type": "integer", "example": 1692169988, "description": "The Unix timestamp representing the time when the completion was generated."}, {"name": "object", "type": "string", "example": "chat.completion.chunk", "description": "A string indicating the type of the chat completion chunk."}, {"name": "choices", "type": "array", "items": [{"type": "object", "properties": [{"name": "index", "type": "integer", "example": 0, "description": "The index of the choice made by the GPT model."}, {"name": "delta", "type": "object", "properties": [{"name": "content", "type": "string", "example": "What", "description": "The content generated by the GPT model."}], "description": "A JSON object containing the content generated by the GPT model."}, {"name": "finish_reason", "type": "string", "example": null, "description": "A string indicating why the GPT model stopped generating content."}]}], "description": "An array containing the choices made by the GPT model to generate the completion."}], "description": "A JSON object representing a chat completion chunk."}', '👋Im a versatile AI trained on a wide range of topics, here to answer your questions about the universe. What are you curious about today?')
ON CONFLICT (slug) DO NOTHING;

View File

@ -1 +0,0 @@
-- DO NOTHING WITH DATA MIGRATION DOWN

View File

@ -1,3 +0,0 @@
INSERT INTO public.collections ("slug", "name", "description") VALUES
('conversational', 'Conversational', 'Converse with these models and get answers.')
ON CONFLICT (slug) DO NOTHING;

View File

@ -1 +0,0 @@
-- DO NOTHING WITH DATA MIGRATION DOWN

View File

@ -1,4 +0,0 @@
INSERT INTO public.collection_products (collection_id, product_id)
SELECT (SELECT id FROM public.collections WHERE slug = 'conversational') AS collection_id, id AS product_id
FROM public.products
WHERE slug IN ('llama2') ON CONFLICT (collection_id, product_id) DO NOTHING;

View File

@ -1 +0,0 @@
-- DO NOTHING WITH DATA MIGRATION DOWN

View File

@ -1,8 +0,0 @@
INSERT INTO public.prompts ("slug", "content", "image_url") VALUES
('conversational-ai-future', 'What are possible developments for AI technology in the next decade?', ''),
('conversational-managing-stress', 'What are some tips for managing stress?', ''),
('conversational-postapoc-robot', 'Let''s role play. You are a robot in a post-apocalyptic world.', ''),
('conversational-python-pytorch', 'What is the difference between Python and Pytorch?', ''),
('conversational-quadratic-equation', 'Can you explain how to solve a quadratic equation?', ''),
('conversational-roman-history', 'What is the history of the Roman Empire?', '')
ON CONFLICT (slug) DO NOTHING;

View File

@ -1 +0,0 @@
-- DO NOTHING WITH DATA MIGRATION DOWN

View File

@ -1,9 +0,0 @@
INSERT INTO public.product_prompts (product_id, prompt_id)
SELECT p.id AS product_id, r.id AS prompt_id
FROM public.products p
JOIN public.prompts r
ON (p.id
IN (SELECT x.id FROM public.products x INNER JOIN public.collection_products y ON x.id = y.product_id
INNER JOIN public.collections z ON y.collection_id = z.id
WHERE z.slug = 'conversational'))
WHERE r.image_url IS NULL OR r.image_url = '' ON CONFLICT (product_id, prompt_id) DO NOTHING;

View File

@ -1,23 +0,0 @@
## postgres database to store Hasura metadata
HASURA_GRAPHQL_METADATA_DATABASE_URL=postgres://postgres:postgrespassword@postgres:5432/postgres
## this env var can be used to add the above postgres database to Hasura as a data source. this can be removed/updated based on your needs
PG_DATABASE_URL=postgres://postgres:postgrespassword@postgres:5432/postgres
## enable the console served by server
HASURA_GRAPHQL_ENABLE_CONSOLE="true" # set to "false" to disable console
## enable debugging mode. It is recommended to disable this in production
HASURA_GRAPHQL_DEV_MODE="true"
HASURA_GRAPHQL_ENABLED_LOG_TYPES=startup, http-log, webhook-log, websocket-log, query-log
## uncomment next line to run console offline (i.e load console assets from server instead of CDN)
# HASURA_GRAPHQL_CONSOLE_ASSETS_DIR: /srv/console-assets
## uncomment next line to set an admin secret
HASURA_GRAPHQL_ADMIN_SECRET=myadminsecretkey
HASURA_GRAPHQL_UNAUTHORIZED_ROLE="public"
HASURA_GRAPHQL_METADATA_DEFAULTS='{"backend_configs":{"dataconnector":{"athena":{"uri":"http://data-connector-agent:8081/api/v1/athena"},"mariadb":{"uri":"http://data-connector-agent:8081/api/v1/mariadb"},"mysql8":{"uri":"http://data-connector-agent:8081/api/v1/mysql"},"oracle":{"uri":"http://data-connector-agent:8081/api/v1/oracle"},"snowflake":{"uri":"http://data-connector-agent:8081/api/v1/snowflake"}}}}'
HASURA_GRAPHQL_JWT_SECRET={"type": "RS256", "key": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}
# Environment variable for auto migrate
HASURA_GRAPHQL_MIGRATIONS_DIR=/migrations
HASURA_GRAPHQL_METADATA_DIR=/metadata
HASURA_GRAPHQL_ENABLE_CONSOLE='true'
HASURA_ACTION_STABLE_DIFFUSION_URL=http://sd:8000
HASURA_EVENTS_HOOK_URL="http://worker:8787"

View File

@ -1 +0,0 @@
POSTGRES_PASSWORD=postgrespassword

View File

@ -1,26 +0,0 @@
CREATE DATABASE "jan-keycloak"
WITH
OWNER = postgres
ENCODING = 'UTF8'
LC_COLLATE = 'en_US.utf8'
LC_CTYPE = 'en_US.utf8'
TABLESPACE = pg_default
CONNECTION LIMIT = -1;
CREATE DATABASE "jan-hasura-data"
WITH
OWNER = postgres
ENCODING = 'UTF8'
LC_COLLATE = 'en_US.utf8'
LC_CTYPE = 'en_US.utf8'
TABLESPACE = pg_default
CONNECTION LIMIT = -1;
CREATE DATABASE "jan-hasura-metadata"
WITH
OWNER = postgres
ENCODING = 'UTF8'
LC_COLLATE = 'en_US.utf8'
LC_CTYPE = 'en_US.utf8'
TABLESPACE = pg_default
CONNECTION LIMIT = -1;

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -1,7 +0,0 @@
<#-- https://github.com/tailwindlabs/heroicons/blob/master/src/20/solid/arrow-top-right-on-square.svg -->
<#macro kw>
<svg class="h-5 w-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path clip-rule="evenodd" d="M4.25 5.5C3.83579 5.5 3.5 5.83579 3.5 6.25V14.75C3.5 15.1642 3.83579 15.5 4.25 15.5H12.75C13.1642 15.5 13.5 15.1642 13.5 14.75V10.75C13.5 10.3358 13.8358 10 14.25 10C14.6642 10 15 10.3358 15 10.75V14.75C15 15.9926 13.9926 17 12.75 17H4.25C3.00736 17 2 15.9926 2 14.75V6.25C2 5.00736 3.00736 4 4.25 4H9.25C9.66421 4 10 4.33579 10 4.75C10 5.16421 9.66421 5.5 9.25 5.5H4.25Z" fill-rule="evenodd" />
<path clip-rule="evenodd" d="M6.19385 12.7532C6.47175 13.0603 6.94603 13.0841 7.25319 12.8062L16.5 4.43999V7.25C16.5 7.66421 16.8358 8 17.25 8C17.6642 8 18 7.66421 18 7.25V2.75C18 2.33579 17.6642 2 17.25 2H12.75C12.3358 2 12 2.33579 12 2.75C12 3.16421 12.3358 3.5 12.75 3.5H15.3032L6.24682 11.6938C5.93966 11.9717 5.91595 12.446 6.19385 12.7532Z" fill-rule="evenodd" />
</svg>
</#macro>

View File

@ -1,6 +0,0 @@
<#-- https://github.com/tailwindlabs/heroicons/blob/master/src/20/solid/chevron-down.svg -->
<#macro kw>
<svg class="h-5 w-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path clip-rule="evenodd" d="M5.23017 7.20938C5.52875 6.92228 6.00353 6.93159 6.29063 7.23017L10 11.1679L13.7094 7.23017C13.9965 6.93159 14.4713 6.92228 14.7698 7.20938C15.0684 7.49647 15.0777 7.97125 14.7906 8.26983L10.5406 12.7698C10.3992 12.9169 10.204 13 10 13C9.79599 13 9.60078 12.9169 9.45938 12.7698L5.20938 8.26983C4.92228 7.97125 4.93159 7.49647 5.23017 7.20938Z" fill-rule="evenodd" />
</svg>
</#macro>

View File

@ -1,14 +0,0 @@
<#-- https://atlassian.design/resources/logo-library -->
<#macro kw name="Bitbucket">
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<title>${name}</title>
<path d="M0.770456 1.21005C0.290906 1.21005 -0.0687541 1.64964 0.0111659 2.08923L3.24816 21.9108C3.32808 22.4304 3.76768 22.79 4.28719 22.79H19.9526C20.3123 22.79 20.632 22.5102 20.7119 22.1505L23.9888 2.1292C24.0688 1.64964 23.7091 1.25002 23.2296 1.25002L0.770456 1.21005ZM14.5177 15.5167H9.52232L8.20352 8.44335H15.7565L14.5177 15.5167Z" fill="#2684FF" />
<path d="M22.9098 8.44335H15.7165L14.5177 15.5167H9.52232L3.64773 22.5102C3.64773 22.5102 3.92746 22.7501 4.32709 22.7501H19.9925C20.3522 22.7501 20.6719 22.4702 20.7518 22.1105L22.9098 8.44335Z" fill="url(#bitbucket)" />
<defs>
<linearGradient id="bitbucket" x1="24.5925" y1="10.4366" x2="12.672" y2="19.7417" gradientUnits="userSpaceOnUse">
<stop offset="0.176" stop-color="#0052CC" />
<stop offset="1" stop-color="#2684FF" />
</linearGradient>
</defs>
</svg>
</#macro>

View File

@ -1,7 +0,0 @@
<#-- https://discord.com/branding -->
<#macro kw name="Discord">
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<title>${name}</title>
<path d="M20.3303 4.42852C18.7535 3.70661 17.0888 3.19446 15.3789 2.90516C15.1449 3.32345 14.9332 3.75381 14.7446 4.19445C12.9232 3.91998 11.071 3.91998 9.24961 4.19445C9.06095 3.75386 8.84924 3.3235 8.61535 2.90516C6.90433 3.19691 5.2386 3.71027 3.66019 4.43229C0.526644 9.06843 -0.322811 13.5894 0.101917 18.0462C1.937 19.4021 3.99098 20.4332 6.17458 21.0948C6.66626 20.4335 7.10134 19.732 7.47519 18.9976C6.76511 18.7324 6.07975 18.4052 5.42706 18.0198C5.59884 17.8952 5.76684 17.7669 5.92918 17.6423C7.82837 18.5354 9.90124 18.9985 12 18.9985C14.0987 18.9985 16.1715 18.5354 18.0707 17.6423C18.235 17.7763 18.403 17.9047 18.5729 18.0198C17.9189 18.4058 17.2323 18.7337 16.5209 18.9995C16.8943 19.7335 17.3294 20.4345 17.8216 21.0948C20.007 20.4359 22.0626 19.4052 23.898 18.0481C24.3963 12.8797 23.0467 8.4002 20.3303 4.42852ZM8.01318 15.3053C6.82961 15.3053 5.85179 14.2312 5.85179 12.9099C5.85179 11.5885 6.79563 10.505 8.0094 10.505C9.22318 10.505 10.1934 11.5885 10.1727 12.9099C10.1519 14.2312 9.21941 15.3053 8.01318 15.3053ZM15.9867 15.3053C14.8013 15.3053 13.8272 14.2312 13.8272 12.9099C13.8272 11.5885 14.7711 10.505 15.9867 10.505C17.2024 10.505 18.1651 11.5885 18.1444 12.9099C18.1236 14.2312 17.193 15.3053 15.9867 15.3053Z" fill="#5865F2" />
</svg>
</#macro>

View File

@ -1,8 +0,0 @@
<#-- https://www.facebook.com/brand/resources/facebookapp/logo -->
<#macro kw name="Facebook">
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<title>${name}</title>
<path d="M24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 17.9895 4.38822 22.954 10.125 23.8542V15.4688H7.07813V12H10.125V9.35626C10.125 6.34875 11.9165 4.68751 14.6576 4.68751C15.9705 4.68751 17.3438 4.92188 17.3438 4.92188V7.875H15.8306C14.3399 7.875 13.875 8.80002 13.875 9.74901V12H17.2031L16.6711 15.4688H13.875V23.8542C19.6118 22.954 24 17.9895 24 12Z" fill="#1877F2" />
<path d="M16.6711 15.4688L17.2031 12H13.875V9.74901C13.875 8.80002 14.3399 7.875 15.8306 7.875H17.3438V4.92188C17.3438 4.92188 15.9705 4.68751 14.6576 4.68751C11.9165 4.68751 10.125 6.34875 10.125 9.35626V12H7.07813V15.4688H10.125V23.8542C10.7453 23.9514 11.3722 24.0002 12 24C12.6379 24 13.2641 23.9501 13.875 23.8542V15.4688H16.6711Z" fill="white" />
</svg>
</#macro>

View File

@ -1,7 +0,0 @@
<#-- https://github.com/logos -->
<#macro kw name="GitHub">
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<title>${name}</title>
<path d="M11.8452 0C5.13387 0 0 5.09516 0 11.8065C0 17.1726 3.37742 21.7645 8.20161 23.3806C8.82097 23.4919 9.03871 23.1097 9.03871 22.7952C9.03871 22.4952 9.02419 20.8403 9.02419 19.8242C9.02419 19.8242 5.6371 20.55 4.92581 18.3823C4.92581 18.3823 4.37419 16.9742 3.58065 16.6113C3.58065 16.6113 2.47258 15.8516 3.65806 15.8661C3.65806 15.8661 4.8629 15.9629 5.52581 17.1145C6.58548 18.9823 8.36129 18.4452 9.05323 18.1258C9.16452 17.3516 9.47903 16.8145 9.82742 16.4952C7.12258 16.1952 4.39355 15.8032 4.39355 11.1484C4.39355 9.81774 4.76129 9.15 5.53548 8.29839C5.40968 7.98387 4.99839 6.6871 5.66129 5.0129C6.67258 4.69839 9 6.31936 9 6.31936C9.96774 6.04839 11.0081 5.90806 12.0387 5.90806C13.0694 5.90806 14.1097 6.04839 15.0774 6.31936C15.0774 6.31936 17.4048 4.69355 18.4161 5.0129C19.079 6.69194 18.6677 7.98387 18.5419 8.29839C19.3161 9.15484 19.7903 9.82258 19.7903 11.1484C19.7903 15.8177 16.9403 16.1903 14.2355 16.4952C14.6806 16.8774 15.0581 17.6032 15.0581 18.7403C15.0581 20.371 15.0435 22.3887 15.0435 22.7855C15.0435 23.1 15.2661 23.4823 15.8806 23.371C20.7194 21.7645 24 17.1726 24 11.8065C24 5.09516 18.5565 0 11.8452 0Z" fill="#181717" />
</svg>
</#macro>

View File

@ -1,10 +0,0 @@
<#-- https://about.gitlab.com/press/press-kit -->
<#macro kw name="GitLab">
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<title>${name}</title>
<path d="M23.6005 9.59068L23.5668 9.50445L20.3002 0.979328C20.2337 0.81224 20.116 0.670499 19.964 0.574441C19.8119 0.480015 19.6345 0.434537 19.4557 0.444146C19.2769 0.453756 19.1054 0.51799 18.9643 0.628176C18.8248 0.741526 18.7235 0.895119 18.6744 1.06805L16.4688 7.81617H7.53749L5.33186 1.06805C5.28402 0.894177 5.18257 0.739814 5.04194 0.626926C4.90083 0.51674 4.7293 0.452506 4.55053 0.442896C4.37175 0.433287 4.19433 0.478766 4.04222 0.573191C3.89054 0.669636 3.77297 0.811254 3.70606 0.978078L0.433225 9.49945L0.400734 9.58568C-0.0695071 10.8143 -0.127551 12.1626 0.235354 13.4271C0.598259 14.6916 1.36244 15.8039 2.41267 16.5962L2.42392 16.605L2.45391 16.6262L7.43002 20.3527L9.89184 22.2159L11.3914 23.3481C11.5668 23.4813 11.781 23.5534 12.0012 23.5534C12.2215 23.5534 12.4357 23.4813 12.6111 23.3481L14.1107 22.2159L16.5725 20.3527L21.5786 16.6037L21.5911 16.5937C22.639 15.8013 23.4014 14.6901 23.7637 13.4273C24.1261 12.1645 24.0688 10.8182 23.6005 9.59068Z" fill="#E24329" />
<path d="M23.6005 9.59068L23.5668 9.50445C21.9751 9.83116 20.4752 10.5054 19.1742 11.4789L12 16.9036C14.4431 18.7519 16.57 20.3577 16.57 20.3577L21.5761 16.6087L21.5886 16.5987C22.638 15.8063 23.4015 14.6945 23.7644 13.4305C24.1272 12.1666 24.0697 10.8191 23.6005 9.59068Z" fill="#FC6D26" />
<path d="M7.43002 20.3577L9.89184 22.2209L11.3914 23.3531C11.5668 23.4863 11.781 23.5584 12.0012 23.5584C12.2215 23.5584 12.4357 23.4863 12.6111 23.3531L14.1107 22.2209L16.5725 20.3577C16.5725 20.3577 14.4431 18.7469 12 16.9036C9.55693 18.7469 7.43002 20.3577 7.43002 20.3577Z" fill="#FCA326" />
<path d="M4.8245 11.4789C3.5246 10.5034 2.02503 9.8274 0.433225 9.49945L0.400734 9.58568C-0.0695071 10.8143 -0.127551 12.1626 0.235354 13.4271C0.598259 14.6916 1.36244 15.8039 2.41267 16.5962L2.42392 16.605L2.45391 16.6262L7.43002 20.3527C7.43002 20.3527 9.55443 18.7469 12 16.8986L4.8245 11.4789Z" fill="#FC6D26" />
</svg>
</#macro>

View File

@ -1,10 +0,0 @@
<#-- https://developers.google.com/identity/branding-guidelines -->
<#macro kw name="Google">
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<title>${name}</title>
<path d="M23.76 12.2727C23.76 11.4218 23.6836 10.6036 23.5418 9.81818H12.24V14.46H18.6982C18.42 15.96 17.5745 17.2309 16.3036 18.0818L18.2427 19.5873L20.1818 21.0927C22.4509 19.0036 23.76 15.9273 23.76 12.2727Z" fill="#4285F4" />
<path d="M12.24 24C15.48 24 18.1964 22.9255 20.1818 21.0927L16.3036 18.0818C15.2291 18.8018 13.8545 19.2273 12.24 19.2273C9.11455 19.2273 6.46909 17.1164 5.52545 14.28L3.52091 15.8345L1.51636 17.3891C3.49091 21.3109 7.54909 24 12.24 24Z" fill="#34A853" />
<path d="M5.52545 14.28C5.28545 13.56 5.14909 12.7909 5.14909 12C5.14909 11.2091 5.28545 10.44 5.52545 9.72L3.52091 8.16546L1.51636 6.61091C0.703637 8.23091 0.240001 10.0636 0.240001 12C0.240001 13.9364 0.703637 15.7691 1.51636 17.3891L5.52545 14.28Z" fill="#FBBC05" />
<path d="M12.24 4.77273C14.0018 4.77273 15.5836 5.37818 16.8273 6.56727L20.2691 3.12545C18.1909 1.18909 15.4745 0 12.24 0C7.54909 0 3.49091 2.68909 1.51636 6.61091L5.52545 9.72C6.46909 6.88364 9.11455 4.77273 12.24 4.77273Z" fill="#EA4335" />
</svg>
</#macro>

View File

@ -1,35 +0,0 @@
<#-- https://www.facebook.com/brand/resources/instagram/instagram-brand -->
<#macro kw name="Instagram">
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<title>${name}</title>
<path d="M19.8463 5.59481C19.8463 4.79718 19.1998 4.15313 18.4052 4.15313C17.6105 4.15313 16.9635 4.79718 16.9635 5.59481C16.9635 6.38951 17.6105 7.03356 18.4052 7.03356C19.1998 7.03356 19.8463 6.38951 19.8463 5.59481Z" fill="url(#instagram_0)" />
<path d="M21.7666 16.8484C21.7132 18.0185 21.5175 18.6543 21.355 19.0765C21.1367 19.6364 20.8764 20.0367 20.4542 20.4565C20.0367 20.8764 19.6364 21.1362 19.0765 21.352C18.6543 21.5169 18.0161 21.7132 16.8461 21.769C15.5811 21.8247 15.2063 21.8366 11.9985 21.8366C8.7937 21.8366 8.4159 21.8247 7.15094 21.769C5.98089 21.7132 5.34573 21.5169 4.92345 21.352C4.36067 21.1362 3.96334 20.8764 3.54347 20.4565C3.12061 20.0367 2.86028 19.6364 2.645 19.0765C2.48248 18.6543 2.28384 18.0185 2.2334 16.8484C2.17175 15.5835 2.16045 15.2027 2.16045 12.0015C2.16045 8.7937 2.17175 8.4159 2.2334 7.15094C2.28384 5.98089 2.48248 5.34573 2.645 4.9199C2.86028 4.36067 3.12061 3.96272 3.54347 3.54284C3.96334 3.12359 4.36067 2.86321 4.92345 2.645C5.34573 2.47954 5.98089 2.28619 7.15094 2.23046C8.4159 2.17469 8.7937 2.16045 11.9985 2.16045C15.2063 2.16045 15.5811 2.17469 16.8461 2.23046C18.0161 2.28619 18.6543 2.47954 19.0765 2.645C19.6364 2.86321 20.0367 3.12359 20.4542 3.54284C20.8764 3.96272 21.1367 4.36067 21.355 4.9199C21.5175 5.34573 21.7132 5.98089 21.7666 7.15094C21.8253 8.4159 21.8395 8.7937 21.8395 12.0015C21.8395 15.2027 21.8253 15.5835 21.7666 16.8484ZM23.9271 7.05251C23.8683 5.77388 23.6667 4.90033 23.3672 4.13948C23.0624 3.35012 22.6538 2.68116 21.9848 2.01221C21.3188 1.34623 20.6499 0.937607 19.8605 0.629238C19.0967 0.3327 18.2261 0.128677 16.9469 0.0729453C15.6677 0.0112537 15.2591 0 11.9985 0C8.74091 0 8.32935 0.0112537 7.05015 0.0729453C5.77388 0.128677 4.90388 0.3327 4.1365 0.629238C3.35012 0.937607 2.68116 1.34623 2.01519 2.01221C1.34623 2.68116 0.937606 3.35012 0.629815 4.13948C0.333277 4.90033 0.131656 5.77388 0.0699646 7.05251C0.0142331 8.33171 0 8.74091 0 12.0015C0 15.2591 0.0142331 15.6677 0.0699646 16.9469C0.131656 18.2231 0.333277 19.0961 0.629815 19.8605C0.937606 20.6469 1.34623 21.3188 2.01519 21.9848C2.68116 22.6508 3.35012 23.0624 4.1365 23.3702C4.90388 23.6667 5.77388 23.8683 7.05015 23.9271C8.32935 23.9858 8.74091 24 11.9985 24C15.2591 24 15.6677 23.9858 16.9469 23.9271C18.2261 23.8683 19.0967 23.6667 19.8605 23.3702C20.6499 23.0624 21.3188 22.6508 21.9848 21.9848C22.6538 21.3188 23.0624 20.6469 23.3672 19.8605C23.6667 19.0961 23.8683 18.2231 23.9271 16.9469C23.9858 15.6677 24 15.2591 24 12.0015C24 8.74091 23.9858 8.33171 23.9271 7.05251Z" fill="url(#instagram_1)" />
<path d="M11.9985 15.998C9.7906 15.998 7.99901 14.2094 7.99901 12.0014C7.99901 9.78998 9.7906 7.99901 11.9985 7.99901C14.207 7.99901 16.001 9.78998 16.001 12.0014C16.001 14.2094 14.207 15.998 11.9985 15.998ZM11.9985 5.83558C8.59502 5.83558 5.83855 8.59796 5.83855 12.0014C5.83855 15.402 8.59502 18.1614 11.9985 18.1614C15.402 18.1614 18.1614 15.402 18.1614 12.0014C18.1614 8.59796 15.402 5.83558 11.9985 5.83558Z" fill="url(#instagram_2)" />
<defs>
<linearGradient id="instagram_0" x1="-139.421" y1="-139.299" x2="42.0899" y2="42.0606" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFD521" />
<stop offset="0.05" stop-color="#FFD521" />
<stop offset="0.501119" stop-color="#F50000" />
<stop offset="0.95" stop-color="#B900B4" />
<stop offset="0.950079" stop-color="#B900B4" />
<stop offset="1" stop-color="#B900B4" />
</linearGradient>
<linearGradient id="instagram_1" x1="0.216477" y1="0.218256" x2="22.0189" y2="22.0207" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFD521" />
<stop offset="0.05" stop-color="#FFD521" />
<stop offset="0.501119" stop-color="#F50000" />
<stop offset="0.95" stop-color="#B900B4" />
<stop offset="0.950079" stop-color="#B900B4" />
<stop offset="1" stop-color="#B900B4" />
</linearGradient>
<linearGradient id="instagram_2" x1="0.222127" y1="23.7823" x2="22.0193" y2="1.98511" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFD521" />
<stop offset="0.05" stop-color="#FFD521" />
<stop offset="0.501119" stop-color="#F50000" />
<stop offset="0.95" stop-color="#B900B4" />
<stop offset="0.950079" stop-color="#B900B4" />
<stop offset="1" stop-color="#B900B4" />
</linearGradient>
</defs>
</svg>
</#macro>

View File

@ -1,7 +0,0 @@
<#-- https://brand.linkedin.com/downloads -->
<#macro kw name="LinkedIn">
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<title>${name}</title>
<path d="M20.4491 20.4489H16.8931V14.88C16.8931 13.552 16.8694 11.8425 15.0436 11.8425C13.1915 11.8425 12.9081 13.2894 12.9081 14.7833V20.4485H9.35204V8.99659H12.7658V10.5616H12.8136C13.1553 9.97748 13.649 9.49694 14.2421 9.17118C14.8352 8.84542 15.5056 8.68663 16.1819 8.71173C19.7861 8.71173 20.4506 11.0824 20.4506 14.1666L20.4491 20.4489ZM5.33963 7.43118C4.93148 7.43126 4.53248 7.3103 4.19308 7.08361C3.85368 6.85692 3.58912 6.53467 3.43287 6.15762C3.27661 5.78057 3.23567 5.36565 3.31522 4.96534C3.39477 4.56502 3.59125 4.19728 3.8798 3.90863C4.16835 3.61997 4.53602 3.42337 4.9363 3.34367C5.33659 3.26397 5.75153 3.30476 6.12863 3.46089C6.50574 3.61701 6.82808 3.88145 7.05489 4.22077C7.28171 4.56009 7.40281 4.95905 7.40288 5.36719C7.40293 5.63819 7.3496 5.90655 7.24594 6.15694C7.14228 6.40732 6.99031 6.63484 6.79872 6.8265C6.60713 7.01816 6.37967 7.17021 6.12931 7.27396C5.87896 7.37771 5.61063 7.43114 5.33963 7.43118ZM7.11765 20.4489H3.5579V8.99659H7.11765V20.4489ZM22.222 0.0016345H1.77099C1.30681 -0.00360376 0.859536 0.175657 0.527458 0.500024C0.195381 0.824392 0.00566506 1.26733 0 1.7315V22.2673C0.00547116 22.7317 0.195065 23.175 0.527132 23.4997C0.859198 23.8244 1.30658 24.004 1.77099 23.999H22.222C22.6873 24.0049 23.1359 23.8258 23.4693 23.5011C23.8027 23.1764 23.9936 22.7326 24 22.2673V1.73002C23.9934 1.26493 23.8024 0.821487 23.469 0.497127C23.1356 0.172767 22.6871 -0.00598123 22.222 0.000152816" fill="#0A66C2" />
</svg>
</#macro>

View File

@ -1,10 +0,0 @@
<#-- https://learn.microsoft.com/azure/active-directory/develop/howto-add-branding-in-azure-ad-apps -->
<#macro kw name="Microsoft">
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<title>${name}</title>
<path d="M11.3684 0H0V11.3684H11.3684V0Z" fill="#F25022" />
<path d="M11.3684 12.6316H0V24H11.3684V12.6316Z" fill="#00A4EF" />
<path d="M24 0H12.6316V11.3684H24V0Z" fill="#7FBA00" />
<path d="M24 12.6316H12.6316V24H24V12.6316Z" fill="#FFB900" />
</svg>
</#macro>

View File

@ -1,9 +0,0 @@
<#-- https://openid.net/add-openid/logos -->
<#macro kw name="OpenID">
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<title>${name}</title>
<path d="M10.9071 2.6627V20.8342V23.1134L14.5427 21.4023V0.886559L10.9071 2.6627Z" fill="#F8941C" />
<path d="M23.4982 8.66156L24 13.8724L16.9691 12.3427" fill="#BCBEC0" />
<path d="M3.63569 15.3299C3.63569 12.7538 6.44278 10.5843 10.2689 9.92206V7.61282C4.41656 8.32019 0 11.5061 0 15.3299C0 19.2916 4.74059 22.5682 10.9071 23.1134V20.8342C6.75829 20.3141 3.63569 18.0475 3.63569 15.3299ZM15.1809 7.61373V9.92206C16.7033 10.1855 18.065 10.6863 19.1519 11.3582L21.7227 9.76936C19.9707 8.68649 17.7095 7.91936 15.1809 7.61373Z" fill="#BCBEC0" />
</svg>
</#macro>

View File

@ -1,11 +0,0 @@
<#-- https://www.redhat.com/technologies/cloud-computing/openshift -->
<#macro kw name="Red Hat OpenShift">
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<title>${name}</title>
<path d="M24 6.60227C23.7314 6.04752 23.4206 5.51216 23.06 5.00724L19.2073 6.40936C19.6553 6.86793 20.0318 7.38336 20.3396 7.93459L24 6.60227ZM6.96939 10.8635L3.11552 12.2656C3.16478 12.8837 3.2715 13.4942 3.42101 14.0923L7.08198 12.7594C6.96292 12.1401 6.9207 11.5021 6.96939 10.8635Z" fill="#C22133" />
<path d="M15.5221 5.51084C16.3237 5.88497 17.0181 6.39515 17.6039 6.99328L21.4566 5.5912C20.3893 4.09352 18.9356 2.84212 17.1547 2.01116C11.6465 -0.557309 5.07525 1.83406 2.50739 7.34161C1.67586 9.12373 1.3668 11.0167 1.51223 12.8498L5.36554 11.4476C5.42944 10.6126 5.63294 9.77582 6.00646 8.97361C7.67543 5.39535 11.9439 3.84258 15.5221 5.51084ZM19.6315 12.5515C19.5699 13.386 19.3594 14.2228 18.9847 15.0256C17.3164 18.6044 13.0473 20.1573 9.46965 18.489C8.66683 18.1142 7.96727 17.6082 7.38377 17.0089L3.53872 18.408C4.60363 19.9057 6.05558 21.1577 7.83765 21.9892C13.3458 24.5571 19.9159 22.1657 22.4844 16.6576C23.3165 14.8767 23.6232 12.9837 23.4766 11.1524L19.6315 12.5515Z" fill="#DB212E" />
<path d="M20.579 7.84756L16.918 9.17988C17.5983 10.3984 17.9196 11.8011 17.814 13.212L21.6591 11.8135C21.549 10.4358 21.1828 9.09077 20.579 7.84756ZM3.66097 14.0044L0 15.3379C0.337597 16.6778 0.921419 17.9433 1.72169 19.0698L5.56619 17.67C4.57929 16.6567 3.92307 15.3742 3.66097 14.0044Z" fill="#EB2126" />
<path d="M23.442 5.58726C23.3206 5.39023 23.1945 5.19611 23.0602 5.00728L19.2075 6.40941C19.377 6.58299 19.533 6.76712 19.6819 6.95594L23.442 5.58726ZM6.95466 11.6373C6.9449 11.3794 6.94979 11.1212 6.9693 10.8638L3.11542 12.2659C3.13536 12.5128 3.16642 12.7579 3.20338 13.0025L6.95466 11.6373Z" fill="#AD213B" />
<path d="M23.4764 11.1523L19.6313 12.5515C19.5908 13.1051 19.4829 13.6598 19.3064 14.2052L23.4916 12.6793C23.5217 12.1706 23.5166 11.6604 23.4764 11.1523ZM3.53905 18.4085C3.83724 18.8278 4.16469 19.2254 4.51896 19.5984L8.70474 18.0719C8.21567 17.7658 7.77352 17.4087 7.38354 17.0088L3.53905 18.4085Z" fill="#BA2133" />
</svg>
</#macro>

View File

@ -1,9 +0,0 @@
<#-- https://www.paypal.com -->
<#macro kw name="PayPal">
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<title>${name}</title>
<path d="M20.1597 6.09762C20.1374 6.23998 20.112 6.38552 20.0833 6.53504C19.0995 11.586 15.7338 13.3309 11.4352 13.3309H9.24646C8.72077 13.3309 8.27778 13.7127 8.19586 14.2312L7.07527 21.3381L6.75795 23.3526C6.74531 23.4325 6.75013 23.5142 6.77209 23.5921C6.79405 23.67 6.83263 23.7421 6.88516 23.8037C6.93769 23.8652 7.00293 23.9146 7.07639 23.9485C7.14985 23.9824 7.22978 24 7.31069 24H11.1926C11.6523 24 12.0428 23.666 12.1151 23.2126L12.1533 23.0154L12.8842 18.3772L12.9311 18.1227C13.0027 17.6678 13.394 17.3337 13.8537 17.3337H14.4343C18.1953 17.3337 21.1395 15.8067 22 11.388C22.3595 9.5421 22.1734 8.00079 21.2222 6.91679C20.9207 6.58146 20.5607 6.30387 20.1597 6.09762Z" fill="#179BD7" />
<path d="M19.1305 5.68724C18.8164 5.59637 18.4969 5.52545 18.1738 5.4749C17.5354 5.37679 16.8902 5.32972 16.2444 5.33413H10.3973C10.1748 5.33396 9.95951 5.4134 9.79045 5.55809C9.6214 5.70279 9.50969 5.90319 9.47551 6.12307L8.23165 14.0014L8.19586 14.2312C8.23461 13.9804 8.36185 13.7518 8.55455 13.5867C8.74725 13.4215 8.99269 13.3308 9.24646 13.3309H11.4352C15.7338 13.3309 19.0995 11.5852 20.0833 6.53504C20.1128 6.38552 20.1374 6.23998 20.1597 6.09762C19.9001 5.96149 19.6295 5.84736 19.3508 5.75644C19.2778 5.73219 19.2043 5.70913 19.1305 5.68724Z" fill="#222D65" />
<path d="M9.47551 6.12307C9.5094 5.90313 9.62105 5.70263 9.79019 5.55801C9.95933 5.41339 10.1747 5.33423 10.3973 5.33492H16.2444C16.9371 5.33492 17.5837 5.38026 18.1738 5.47569C18.5731 5.53845 18.9669 5.63232 19.3516 5.75644C19.6419 5.85267 19.9115 5.9664 20.1605 6.09762C20.4531 4.23104 20.1581 2.96014 19.1488 1.80933C18.0362 0.5424 16.0281 0 13.4584 0H5.99843C5.47352 0 5.02577 0.381748 4.94464 0.901084L1.83738 20.5969C1.8229 20.6883 1.82841 20.7818 1.85352 20.8709C1.87863 20.96 1.92274 21.0427 1.98282 21.1131C2.0429 21.1835 2.11753 21.2401 2.20157 21.279C2.28561 21.3178 2.37707 21.338 2.46965 21.3381L7.07527 21.3381L8.23165 14.0014L9.47551 6.12307Z" fill="#253B80" />
</svg>
</#macro>

View File

@ -1,79 +0,0 @@
<#import "./bitbucket.ftl" as bitbucketIcon>
<#import "./discord.ftl" as discordIcon>
<#import "./facebook.ftl" as facebookIcon>
<#import "./github.ftl" as githubIcon>
<#import "./gitlab.ftl" as gitlabIcon>
<#import "./google.ftl" as googleIcon>
<#import "./instagram.ftl" as instagramIcon>
<#import "./linkedin.ftl" as linkedinIcon>
<#import "./microsoft.ftl" as microsoftIcon>
<#import "./oidc.ftl" as oidcIcon>
<#import "./openshift.ftl" as openshiftIcon>
<#import "./paypal.ftl" as paypalIcon>
<#import "./slack.ftl" as slackIcon>
<#import "./stackoverflow.ftl" as stackoverflowIcon>
<#import "./twitter.ftl" as twitterIcon>
<#macro bitbucket>
<@bitbucketIcon.kw />
</#macro>
<#macro discord>
<@discordIcon.kw />
</#macro>
<#macro facebook>
<@facebookIcon.kw />
</#macro>
<#macro github>
<@githubIcon.kw />
</#macro>
<#macro gitlab>
<@gitlabIcon.kw />
</#macro>
<#macro google>
<@googleIcon.kw />
</#macro>
<#macro instagram>
<@instagramIcon.kw />
</#macro>
<#macro linkedin>
<@linkedinIcon.kw />
</#macro>
<#macro microsoft>
<@microsoftIcon.kw />
</#macro>
<#macro oidc>
<@oidcIcon.kw />
</#macro>
<#macro "openshift-v3">
<@openshiftIcon.kw />
</#macro>
<#macro "openshift-v4">
<@openshiftIcon.kw />
</#macro>
<#macro paypal>
<@paypalIcon.kw />
</#macro>
<#macro slack>
<@slackIcon.kw />
</#macro>
<#macro stackoverflow>
<@stackoverflowIcon.kw />
</#macro>
<#macro twitter>
<@twitterIcon.kw />
</#macro>

View File

@ -1,14 +0,0 @@
<#-- https://slack.com/media-kit -->
<#macro kw name="Slack">
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<title>${name}</title>
<path d="M5.04235 15.1661C5.04235 16.5537 3.9088 17.6873 2.52117 17.6873C1.13355 17.6873 0 16.5537 0 15.1661C0 13.7785 1.13355 12.645 2.52117 12.645H5.04235V15.1661Z" fill="#E01E5A" />
<path d="M6.3127 15.1661C6.3127 13.7785 7.44626 12.645 8.83388 12.645C10.2215 12.645 11.355 13.7785 11.355 15.1661V21.4788C11.355 22.8664 10.2215 24 8.83388 24C7.44626 24 6.3127 22.8664 6.3127 21.4788V15.1661Z" fill="#E01E5A" />
<path d="M8.83388 5.04235C7.44626 5.04235 6.3127 3.9088 6.3127 2.52117C6.3127 1.13355 7.44626 0 8.83388 0C10.2215 0 11.355 1.13355 11.355 2.52117V5.04235H8.83388Z" fill="#36C5F0" />
<path d="M8.83388 6.3127C10.2215 6.3127 11.355 7.44626 11.355 8.83388C11.355 10.2215 10.2215 11.355 8.83388 11.355H2.52117C1.13355 11.355 0 10.2215 0 8.83388C0 7.44626 1.13355 6.3127 2.52117 6.3127H8.83388Z" fill="#36C5F0" />
<path d="M18.9577 8.83388C18.9577 7.44626 20.0912 6.3127 21.4788 6.3127C22.8664 6.3127 24 7.44626 24 8.83388C24 10.2215 22.8664 11.355 21.4788 11.355H18.9577V8.83388Z" fill="#2EB67D" />
<path d="M17.6873 8.83388C17.6873 10.2215 16.5537 11.355 15.1661 11.355C13.7785 11.355 12.645 10.2215 12.645 8.83388V2.52117C12.645 1.13355 13.7785 0 15.1661 0C16.5537 0 17.6873 1.13355 17.6873 2.52117V8.83388Z" fill="#2EB67D" />
<path d="M15.1661 18.9577C16.5537 18.9577 17.6873 20.0912 17.6873 21.4788C17.6873 22.8664 16.5537 24 15.1661 24C13.7785 24 12.645 22.8664 12.645 21.4788V18.9577H15.1661Z" fill="#ECB22E" />
<path d="M15.1661 17.6873C13.7785 17.6873 12.645 16.5537 12.645 15.1661C12.645 13.7785 13.7785 12.645 15.1661 12.645H21.4788C22.8664 12.645 24 13.7785 24 15.1661C24 16.5537 22.8664 17.6873 21.4788 17.6873H15.1661Z" fill="#ECB22E" />
</svg>
</#macro>

View File

@ -1,8 +0,0 @@
<#-- https://stackoverflow.design/brand/logo -->
<#macro kw name="Stack Overflow">
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<title>${name}</title>
<path d="M18.9475 15.4707H21.0799V24H1.88887V15.4707H4.0212V21.8677H18.9475V15.4707Z" fill="#BBBBBB" />
<path d="M6.34504 14.8368L16.8177 17.0379L17.2579 14.9444L6.78527 12.7422L6.34504 14.8368ZM7.73086 9.82211L17.4322 14.3403L18.3359 12.4001L8.63439 7.88188L7.73086 9.82211ZM10.4153 5.06255L18.6399 11.9114L20.0096 10.2666L11.785 3.41794L10.4153 5.06255ZM15.7242 0L14.0067 1.27746L20.3936 9.86495L22.1111 8.58768L15.7242 0ZM6.15354 19.7353H16.8152V17.603H6.15354V19.7353Z" fill="#F58025" />
</svg>
</#macro>

View File

@ -1,7 +0,0 @@
<#-- https://about.twitter.com/en/who-we-are/brand-toolkit -->
<#macro kw name="Twitter">
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<title>${name}</title>
<path d="M21.543 7.10409C21.5576 7.31567 21.5576 7.52725 21.5576 7.74077C21.5576 14.2471 16.6045 21.7508 7.54759 21.7508V21.7469C4.87215 21.7508 2.25229 20.9844 0 19.5394C0.389031 19.5862 0.780012 19.6096 1.17197 19.6106C3.38915 19.6126 5.54296 18.8686 7.28726 17.4987C5.18026 17.4588 3.3326 16.085 2.68714 14.0793C3.42523 14.2217 4.18574 14.1924 4.91018 13.9945C2.61304 13.5304 0.96039 11.5121 0.96039 9.1682C0.96039 9.14675 0.96039 9.12627 0.96039 9.1058C1.64485 9.48703 2.41121 9.6986 3.19512 9.722C1.03157 8.27606 0.364656 5.39781 1.67118 3.14748C4.17112 6.22365 7.8596 8.09373 11.8191 8.29166C11.4223 6.58148 11.9644 4.7894 13.2436 3.58721C15.2268 1.72298 18.3459 1.81853 20.2101 3.80074C21.3129 3.58331 22.3698 3.17868 23.337 2.60537C22.9694 3.74516 22.2001 4.71335 21.1725 5.32859C22.1484 5.21353 23.102 4.95223 24 4.55345C23.3389 5.54406 22.5063 6.40695 21.543 7.10409Z" fill="#1D9BF0" />
</svg>
</#macro>

View File

@ -1,22 +0,0 @@
<#macro kw color="">
<#switch color>
<#case "error">
<#assign colorClass="bg-red-100 text-red-600">
<#break>
<#case "info">
<#assign colorClass="bg-blue-100 text-blue-600">
<#break>
<#case "success">
<#assign colorClass="bg-green-100 text-green-600">
<#break>
<#case "warning">
<#assign colorClass="bg-orange-100 text-orange-600">
<#break>
<#default>
<#assign colorClass="bg-blue-100 text-blue-600">
</#switch>
<div class="${colorClass} p-4 rounded-lg text-sm" role="alert">
<#nested>
</div>
</#macro>

View File

@ -1,5 +0,0 @@
<#macro kw>
<body class="bg-secondary-100 flex flex-col items-center justify-center min-h-screen sm:py-16">
<#nested>
</body>
</#macro>

View File

@ -1,5 +0,0 @@
<#macro kw>
<div class="flex flex-col pt-4 space-y-2">
<#nested>
</div>
</#macro>

Some files were not shown because too many files have changed in this diff Show More