Spaces:
Running
Running
Germano Cavalcante
commited on
Commit
β’
23415c5
1
Parent(s):
25dbca2
Updates
Browse files- config.py +0 -1
- main.py +3 -3
- routers/{embedding β rag}/__init__.py +0 -0
- routers/{embedding β rag}/embeddings_dev_docs.pkl +0 -0
- routers/{embedding β rag}/embeddings_issues.pkl +2 -2
- routers/{embedding β rag}/embeddings_manual.pkl +0 -0
- routers/tool_find_related.py +3 -3
- routers/tool_wiki_search.py +3 -3
config.py
CHANGED
@@ -5,7 +5,6 @@ import os
|
|
5 |
class Settings(BaseSettings):
|
6 |
huggingface_key: str = os.environ.get("huggingface_key")
|
7 |
OPENAI_API_KEY: str = os.environ.get("OPENAI_API_KEY")
|
8 |
-
cache_dir: str = "cache"
|
9 |
embedding_api: str = "sbert"
|
10 |
embedding_model: str = "mano-wii/BAAI_bge-base-en-v1.5-tunned-for-blender-issues"
|
11 |
# embedding_api: str = "openai"
|
|
|
5 |
class Settings(BaseSettings):
|
6 |
huggingface_key: str = os.environ.get("huggingface_key")
|
7 |
OPENAI_API_KEY: str = os.environ.get("OPENAI_API_KEY")
|
|
|
8 |
embedding_api: str = "sbert"
|
9 |
embedding_model: str = "mano-wii/BAAI_bge-base-en-v1.5-tunned-for-blender-issues"
|
10 |
# embedding_api: str = "openai"
|
main.py
CHANGED
@@ -15,9 +15,9 @@ app = FastAPI(openapi_url="/api/v1/openapi.json",
|
|
15 |
|
16 |
app.add_middleware(
|
17 |
CORSMiddleware,
|
18 |
-
allow_origins=["
|
19 |
-
allow_methods=["
|
20 |
-
allow_headers=["
|
21 |
allow_credentials=True,
|
22 |
)
|
23 |
|
|
|
15 |
|
16 |
app.add_middleware(
|
17 |
CORSMiddleware,
|
18 |
+
allow_origins=["https://projects.blender.org"],
|
19 |
+
allow_methods=["GET", "POST"],
|
20 |
+
allow_headers=["Authorization", "Content-Type"],
|
21 |
allow_credentials=True,
|
22 |
)
|
23 |
|
routers/{embedding β rag}/__init__.py
RENAMED
File without changes
|
routers/{embedding β rag}/embeddings_dev_docs.pkl
RENAMED
File without changes
|
routers/{embedding β rag}/embeddings_issues.pkl
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:205e87fc19bcf5ebfb1bae076774b47ba0a866ffb64e154b691fd420f7ec4ee6
|
3 |
+
size 723466668
|
routers/{embedding β rag}/embeddings_manual.pkl
RENAMED
File without changes
|
routers/tool_find_related.py
CHANGED
@@ -13,10 +13,10 @@ from fastapi import APIRouter
|
|
13 |
from fastapi.responses import PlainTextResponse
|
14 |
|
15 |
try:
|
16 |
-
from .
|
17 |
from .utils_gitea import gitea_fetch_issues, gitea_json_issue_get, gitea_issues_body_updated_at_get
|
18 |
except:
|
19 |
-
from
|
20 |
from utils_gitea import gitea_fetch_issues, gitea_json_issue_get, gitea_issues_body_updated_at_get
|
21 |
|
22 |
|
@@ -33,7 +33,7 @@ class State(str, Enum):
|
|
33 |
|
34 |
|
35 |
class _Data(dict):
|
36 |
-
cache_path = "routers/
|
37 |
|
38 |
@staticmethod
|
39 |
def _create_issue_string(title, body):
|
|
|
13 |
from fastapi.responses import PlainTextResponse
|
14 |
|
15 |
try:
|
16 |
+
from .rag import EMBEDDING_CTX
|
17 |
from .utils_gitea import gitea_fetch_issues, gitea_json_issue_get, gitea_issues_body_updated_at_get
|
18 |
except:
|
19 |
+
from rag import EMBEDDING_CTX
|
20 |
from utils_gitea import gitea_fetch_issues, gitea_json_issue_get, gitea_issues_body_updated_at_get
|
21 |
|
22 |
|
|
|
33 |
|
34 |
|
35 |
class _Data(dict):
|
36 |
+
cache_path = "routers/rag/embeddings_issues.pkl"
|
37 |
|
38 |
@staticmethod
|
39 |
def _create_issue_string(title, body):
|
routers/tool_wiki_search.py
CHANGED
@@ -13,10 +13,10 @@ from sentence_transformers import util
|
|
13 |
from typing import Dict, List, Tuple, Set, LiteralString
|
14 |
|
15 |
try:
|
16 |
-
from .
|
17 |
from .utils_gitea import gitea_wiki_page_get, gitea_wiki_pages_get
|
18 |
except:
|
19 |
-
from
|
20 |
from utils_gitea import gitea_wiki_page_get, gitea_wiki_pages_get
|
21 |
|
22 |
|
@@ -31,7 +31,7 @@ class Group(str, Enum):
|
|
31 |
|
32 |
|
33 |
class _Data(dict):
|
34 |
-
cache_path = "routers/
|
35 |
|
36 |
def __init__(self):
|
37 |
for grp in list(Group):
|
|
|
13 |
from typing import Dict, List, Tuple, Set, LiteralString
|
14 |
|
15 |
try:
|
16 |
+
from .rag import SplitDocs, EMBEDDING_CTX
|
17 |
from .utils_gitea import gitea_wiki_page_get, gitea_wiki_pages_get
|
18 |
except:
|
19 |
+
from rag import SplitDocs, EMBEDDING_CTX
|
20 |
from utils_gitea import gitea_wiki_page_get, gitea_wiki_pages_get
|
21 |
|
22 |
|
|
|
31 |
|
32 |
|
33 |
class _Data(dict):
|
34 |
+
cache_path = "routers/rag/embeddings_{}.pkl"
|
35 |
|
36 |
def __init__(self):
|
37 |
for grp in list(Group):
|