Skip to content

Commit

Permalink
add version (infiniflow#807)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?
infiniflow#709 
### Type of change

- [x] New Feature (non-breaking change which adds functionality)
  • Loading branch information
KevinHuSh authored May 16, 2024
1 parent 77cfc3e commit c0aed85
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 73 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ENV PYTHONPATH=/ragflow/
ENV HF_ENDPOINT=https://hf-mirror.com

ADD docker/entrypoint.sh ./entrypoint.sh
ADD docker/.env ./
RUN chmod +x ./entrypoint.sh

ENTRYPOINT ["./entrypoint.sh"]
67 changes: 0 additions & 67 deletions api/db/services/kb_service.py

This file was deleted.

10 changes: 4 additions & 6 deletions api/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@
# limitations under the License.
#
import os

import dotenv
import typing

from api.utils.file_utils import get_project_base_directory


def get_versions() -> typing.Mapping[str, typing.Any]:
return dotenv.dotenv_values(
dotenv_path=os.path.join(get_project_base_directory(), "rag.env")
)
dotenv.load_dotenv(dotenv.find_dotenv())
return dotenv.dotenv_values()


def get_rag_version() -> typing.Optional[str]:
return get_versions().get("RAG")
return get_versions().get("RAGFLOW_VERSION", "dev")

0 comments on commit c0aed85

Please sign in to comment.