add dialog api (#33)

This commit is contained in:
KevinHuSh
2024-01-17 20:20:42 +08:00
committed by GitHub
parent 6be3dd56fa
commit 9bf75d4511
50 changed files with 511 additions and 273 deletions

View File

@ -1,5 +1,5 @@
#
# Copyright 2019 The RAG Flow Authors. All Rights Reserved.
# Copyright 2019 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@ -1,5 +1,5 @@
#
# Copyright 2019 The RAG Flow Authors. All Rights Reserved.
# Copyright 2019 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -24,16 +24,16 @@ from flask import (
)
from werkzeug.http import HTTP_STATUS_CODES
from web_server.utils import json_dumps
from web_server.versions import get_rag_version
from web_server.settings import RetCode
from web_server.settings import (
from api.utils import json_dumps
from api.versions import get_rag_version
from api.settings import RetCode
from api.settings import (
REQUEST_MAX_WAIT_SEC, REQUEST_WAIT_SEC,
stat_logger,CLIENT_AUTHENTICATION, HTTP_APP_KEY, SECRET_KEY
)
import requests
import functools
from web_server.utils import CustomJSONEncoder
from api.utils import CustomJSONEncoder
from uuid import uuid1
from base64 import b64encode
from hmac import HMAC

View File

@ -1,5 +1,5 @@
#
# Copyright 2019 The RAG Flow Authors. All Rights Reserved.
# Copyright 2019 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -21,7 +21,7 @@ import re
from cachetools import LRUCache, cached
from ruamel.yaml import YAML
from web_server.db import FileType
from api.db import FileType
PROJECT_BASE = os.getenv("RAG_PROJECT_BASE") or os.getenv("RAG_DEPLOY_BASE")
RAG_BASE = os.getenv("RAG_BASE")

View File

@ -1,5 +1,5 @@
#
# Copyright 2019 The RAG Flow Authors. All Rights Reserved.
# Copyright 2019 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -21,7 +21,7 @@ import inspect
from logging.handlers import TimedRotatingFileHandler
from threading import RLock
from web_server.utils import file_utils
from api.utils import file_utils
class LoggerFactory(object):
TYPE = "FILE"

View File

@ -1,7 +1,7 @@
import base64, os, sys
from Cryptodome.PublicKey import RSA
from Cryptodome.Cipher import PKCS1_v1_5 as Cipher_pkcs1_v1_5
from web_server.utils import decrypt, file_utils
from api.utils import decrypt, file_utils
def crypt(line):
file_path = os.path.join(file_utils.get_project_base_directory(), "conf", "public.pem")