Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rag-flow-k8s
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michal Masrna
rag-flow-k8s
Commits
37185466
There was an error fetching the commit references. Please try again later.
Unverified
Commit
37185466
authored
11 months ago
by
KevinHuSh
Committed by
GitHub
11 months ago
Browse files
Options
Downloads
Patches
Plain Diff
READEME refined (#156)
parent
fd7fcb5b
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+14
-13
14 additions, 13 deletions
README.md
rag/app/naive.py
+4
-2
4 additions, 2 deletions
rag/app/naive.py
rag/nlp/search.py
+1
-1
1 addition, 1 deletion
rag/nlp/search.py
with
19 additions
and
16 deletions
README.md
+
14
−
13
View file @
37185466
...
...
@@ -79,10 +79,6 @@ vm.max_map_count=262144
If your machine doesn't have
*Docker*
installed, please refer to
[
Install Docker Engine
](
https://docs.docker.com/engine/install/
)
## Quick Start
> If you want to change the basic setups, like port, password .etc., please refer to [.env](./docker/.env) before starting the system.
> If you change anything in [.env](./docker/.env), please check [service_conf.yaml](./docker/service_conf.yaml) which is a
> configuration of the back-end service and should be consistent with [.env](./docker/.env).
> - In [service_conf.yaml](./docker/service_conf.yaml), configuration of *LLM* in **user_default_llm** is strongly recommended.
> In **user_default_llm** of [service_conf.yaml](./docker/service_conf.yaml), you need to specify LLM factory and your own _API_KEY_.
...
...
@@ -91,25 +87,25 @@ If your machine doesn't have *Docker* installed, please refer to [Install Docker
> [OpenAI](https://platform.openai.com/login?launch), [Tongyi-Qianwen](https://dashscope.console.aliyun.com/model),
> [ZHIPU-AI](https://open.bigmodel.cn/), [Moonshot](https://platform.moonshot.cn/docs/docs)
```
bash
121:/#
git clone https://github.com/infiniflow/ragflow.git
121:/#
cd
ragflow/docker
121:/ragflow/docker#
docker compose up
-d
$
git clone https://github.com/infiniflow/ragflow.git
$
cd
ragflow/docker
$
docker compose up
-d
```
### OR
```
bash
121:/#
git clone https://github.com/infiniflow/ragflow.git
121:/#
cd
ragflow/
121:/#
docker build
-t
infiniflow/ragflow:v1.0
.
121:/#
cd
ragflow/docker
121:/ragflow/docker#
docker compose up
-d
$
git clone https://github.com/infiniflow/ragflow.git
$
cd
ragflow/
$
docker build
-t
infiniflow/ragflow:v1.0
.
$
cd
ragflow/docker
$
docker compose up
-d
```
> The core image is about 15GB, please be patient for the first time
After pulling all the images and running up, use the following command to check the server status. If you can have the following outputs,
_**Hallelujah!**_
You have successfully launched the system.
```
bash
121:/ragflow#
docker logs
-f
ragflow-server
$
docker logs
-f
ragflow-server
____ ______ __
/ __
\
____ _ ____ _ / ____// /____ _ __
...
...
@@ -139,6 +135,11 @@ If you need to change the default setting of the system when you deploy it. Ther
Please refer to
[
README
](
./docker/README.md
)
and manually set the configuration.
After changing something, please run
*docker-compose up -d*
again.
> If you want to change the basic setups, like port, password .etc., please refer to [.env](./docker/.env) before starting the system.
> If you change anything in [.env](./docker/.env), please check [service_conf.yaml](./docker/service_conf.yaml) which is a
> configuration of the back-end service and should be consistent with [.env](./docker/.env).
# RoadMap
-
[ ] File manager.
...
...
This diff is collapsed.
Click to expand it.
rag/app/naive.py
+
4
−
2
View file @
37185466
...
...
@@ -42,7 +42,9 @@ class Pdf(PdfParser):
self
.
_text_merge
()
callback
(
0.67
,
"
Text merging finished
"
)
tbls
=
self
.
_extract_table_figure
(
True
,
zoomin
,
True
,
True
)
self
.
_naive_vertical_merge
()
#self._naive_vertical_merge()
self
.
_concat_downward
()
#self._filter_forpages()
cron_logger
.
info
(
"
paddle layouts:
"
.
format
(
(
timer
()
-
start
)
/
(
self
.
total_page
+
0.1
)))
...
...
@@ -79,7 +81,7 @@ def chunk(filename, binary=None, from_page=0, to_page=100000,
elif
re
.
search
(
r
"
\.pdf$
"
,
filename
,
re
.
IGNORECASE
):
pdf_parser
=
Pdf
(
)
if
parser_config
[
"
layout_recognize
"
]
else
PlainParser
()
)
if
parser_config
.
get
(
"
layout_recognize
"
,
True
)
else
PlainParser
()
sections
,
tbls
=
pdf_parser
(
filename
if
not
binary
else
binary
,
from_page
=
from_page
,
to_page
=
to_page
,
callback
=
callback
)
res
=
tokenize_table
(
tbls
,
doc
,
eng
)
...
...
This diff is collapsed.
Click to expand it.
rag/nlp/search.py
+
1
−
1
View file @
37185466
...
...
@@ -7,7 +7,6 @@ from elasticsearch_dsl import Q, Search
from
typing
import
List
,
Optional
,
Dict
,
Union
from
dataclasses
import
dataclass
from
api.settings
import
chat_logger
from
rag.settings
import
es_logger
from
rag.utils
import
rmSpace
from
rag.nlp
import
huqie
,
query
...
...
@@ -365,6 +364,7 @@ class Dealer:
return
ranks
def
sql_retrieval
(
self
,
sql
,
fetch_size
=
128
,
format
=
"
json
"
):
from
api.settings
import
chat_logger
sql
=
re
.
sub
(
r
"
[ ]+
"
,
"
"
,
sql
)
sql
=
sql
.
replace
(
"
%
"
,
""
)
es_logger
.
info
(
f
"
Get es sql:
{
sql
}
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment