mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-07-30 04:12:01 +08:00

### What problem does this PR solve? Invoke component can be used to call third party services. Tried GET/POST/PUT from web UI, and found PUT request failed like this: (test api: api/v1/chats/<assistant_id>) ``` {"code":100,"data":null,"message":"AttributeError("'NoneType' object has no attribute 'get'")"} ``` Root cause: Invoke PUT with a 'data=args' parameter, which is a form-encoded data, however the default content type setting of request header is application/json. The test api could not deal with such case. Fix: use the 'json' parameter of reqeusts.put(), same as Invoke POST. Do not use the 'data' parameter. Another way is to use 'data=json.dumps(args)'. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
English | 简体中文
Graph
Introduction
Graph is a mathematical concept which is composed of nodes and edges. It is used to compose a complex work flow or agent. And this graph is beyond the DAG that we can use circles to describe our agent or work flow. Under this folder, we propose a test tool ./test/client.py which can test the DSLs such as json files in folder ./test/dsl_examples. Please use this client at the same folder you start RAGFlow. If it's run by Docker, please go into the container before running the client. Otherwise, correct configurations in service_conf.yaml is essential.
PYTHONPATH=path/to/ragflow python graph/test/client.py -h
usage: client.py [-h] -s DSL -t TENANT_ID -m
options:
-h, --help show this help message and exit
-s DSL, --dsl DSL input dsl
-t TENANT_ID, --tenant_id TENANT_ID
Tenant ID
-m, --stream Stream output