Merge branch 'main' of github.com:1Panel-dev/maxkb

This commit is contained in:
shaohuzhang1 2024-03-20 13:03:59 +08:00
commit 4d6d022fc8
5 changed files with 8 additions and 8 deletions

View File

@ -10,8 +10,8 @@ on:
type: choice
options:
- linux/amd64
- linux/arm64
- linux/amd64,linux/arm64
#- linux/arm64
#- linux/amd64,linux/arm64
jobs:
build-and-push-python-pg-to-ghcr:
runs-on: ubuntu-latest

View File

@ -14,8 +14,8 @@ on:
type: choice
options:
- linux/amd64
- linux/arm64
- linux/amd64,linux/arm64
#- linux/arm64
#- linux/amd64,linux/arm64
jobs:
build-and-push-vector-model-to-ghcr:

View File

@ -14,8 +14,8 @@ on:
type: choice
options:
- linux/amd64
- linux/arm64
- linux/amd64,linux/arm64
#- linux/arm64
#- linux/amd64,linux/arm64
registry:
description: 'Push To Registry'
required: true

View File

@ -13,7 +13,6 @@ import os
import re
from importlib import import_module
from urllib.parse import urljoin, urlparse
import torch.backends
import yaml
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@ -91,7 +90,7 @@ class Config(dict):
"EMAIL_HOST_PASSWORD": "",
# 向量模型
"EMBEDDING_MODEL_NAME": "shibing624/text2vec-base-chinese",
"EMBEDDING_DEVICE": "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu",
"EMBEDDING_DEVICE": "cpu",
"EMBEDDING_MODEL_PATH": os.path.join(PROJECT_DIR, 'models'),
# 向量库配置
"VECTOR_STORE_NAME": 'pg_vector'

View File

@ -19,6 +19,7 @@ diskcache = "^5.6.3"
pillow = "^10.2.0"
filetype = "^1.2.0"
chardet = "^5.2.0"
torch = { url = "https://download.pytorch.org/whl/cpu/torch-2.2.1%2Bcpu-cp311-cp311-linux_x86_64.whl", markers = "sys_platform == 'linux'"}
sentence-transformers = "^2.2.2"
blinker = "^1.6.3"
openai = "^1.13.3"