flowllm 0.1.0__tar.gz → 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {flowllm-0.1.0 → flowllm-0.1.1}/LICENSE +1 -1
- {flowllm-0.1.0 → flowllm-0.1.1}/PKG-INFO +31 -27
- {flowllm-0.1.0 → flowllm-0.1.1}/README.md +28 -25
- flowllm-0.1.1/flowllm/__init__.py +12 -0
- flowllm-0.1.1/flowllm/app.py +25 -0
- flowllm-0.1.1/flowllm/config/default_config.yaml +82 -0
- flowllm-0.1.1/flowllm/config/pydantic_config_parser.py +242 -0
- flowllm-0.1.1/flowllm/context/base_context.py +59 -0
- flowllm-0.1.1/flowllm/context/flow_context.py +28 -0
- flowllm-0.1.0/llmflow/op/prompt_mixin.py → flowllm-0.1.1/flowllm/context/prompt_handler.py +25 -14
- flowllm-0.1.1/flowllm/context/registry.py +26 -0
- flowllm-0.1.1/flowllm/context/service_context.py +103 -0
- flowllm-0.1.1/flowllm/embedding_model/__init__.py +1 -0
- {flowllm-0.1.0/llmflow → flowllm-0.1.1/flowllm}/embedding_model/base_embedding_model.py +2 -2
- {flowllm-0.1.0/llmflow → flowllm-0.1.1/flowllm}/embedding_model/openai_compatible_embedding_model.py +8 -8
- flowllm-0.1.1/flowllm/flow_engine/__init__.py +1 -0
- flowllm-0.1.1/flowllm/flow_engine/base_flow_engine.py +34 -0
- flowllm-0.1.1/flowllm/flow_engine/simple_flow_engine.py +213 -0
- flowllm-0.1.1/flowllm/llm/__init__.py +1 -0
- {flowllm-0.1.0/llmflow → flowllm-0.1.1/flowllm}/llm/base_llm.py +16 -24
- {flowllm-0.1.0/llmflow → flowllm-0.1.1/flowllm}/llm/openai_compatible_llm.py +64 -108
- flowllm-0.1.1/flowllm/op/__init__.py +3 -0
- flowllm-0.1.1/flowllm/op/akshare/get_ak_a_code_op.py +116 -0
- flowllm-0.1.1/flowllm/op/akshare/get_ak_a_code_prompt.yaml +21 -0
- flowllm-0.1.1/flowllm/op/akshare/get_ak_a_info_op.py +143 -0
- flowllm-0.1.1/flowllm/op/base_op.py +169 -0
- flowllm-0.1.1/flowllm/op/llm_base_op.py +63 -0
- flowllm-0.1.1/flowllm/op/mock_op.py +42 -0
- flowllm-0.1.1/flowllm/op/parallel_op.py +30 -0
- flowllm-0.1.1/flowllm/op/sequential_op.py +29 -0
- flowllm-0.1.1/flowllm/schema/flow_response.py +12 -0
- flowllm-0.1.1/flowllm/schema/message.py +35 -0
- flowllm-0.1.1/flowllm/schema/service_config.py +76 -0
- flowllm-0.1.1/flowllm/schema/tool_call.py +110 -0
- flowllm-0.1.1/flowllm/service/__init__.py +2 -0
- flowllm-0.1.1/flowllm/service/base_service.py +59 -0
- flowllm-0.1.1/flowllm/service/http_service.py +87 -0
- flowllm-0.1.1/flowllm/service/mcp_service.py +45 -0
- flowllm-0.1.1/flowllm/storage/__init__.py +1 -0
- flowllm-0.1.1/flowllm/storage/vector_store/__init__.py +3 -0
- flowllm-0.1.1/flowllm/storage/vector_store/base_vector_store.py +44 -0
- {flowllm-0.1.0/llmflow → flowllm-0.1.1/flowllm/storage}/vector_store/chroma_vector_store.py +11 -10
- {flowllm-0.1.0/llmflow → flowllm-0.1.1/flowllm/storage}/vector_store/es_vector_store.py +10 -9
- flowllm-0.1.0/llmflow/vector_store/file_vector_store.py → flowllm-0.1.1/flowllm/storage/vector_store/local_vector_store.py +110 -10
- flowllm-0.1.1/flowllm/utils/common_utils.py +64 -0
- flowllm-0.1.1/flowllm/utils/dataframe_cache.py +331 -0
- flowllm-0.1.1/flowllm/utils/fetch_url.py +113 -0
- {flowllm-0.1.0/llmflow → flowllm-0.1.1/flowllm}/utils/timer.py +5 -4
- {flowllm-0.1.0 → flowllm-0.1.1}/flowllm.egg-info/PKG-INFO +31 -27
- flowllm-0.1.1/flowllm.egg-info/SOURCES.txt +68 -0
- flowllm-0.1.1/flowllm.egg-info/entry_points.txt +4 -0
- {flowllm-0.1.0 → flowllm-0.1.1}/flowllm.egg-info/requires.txt +1 -0
- flowllm-0.1.1/flowllm.egg-info/top_level.txt +1 -0
- {flowllm-0.1.0 → flowllm-0.1.1}/pyproject.toml +7 -5
- flowllm-0.1.1/test/test_config.py +66 -0
- flowllm-0.1.1/test/test_dataframe_cache.py +205 -0
- flowllm-0.1.1/test/test_simple_flow.py +148 -0
- flowllm-0.1.0/flowllm.egg-info/SOURCES.txt +0 -69
- flowllm-0.1.0/flowllm.egg-info/entry_points.txt +0 -3
- flowllm-0.1.0/flowllm.egg-info/top_level.txt +0 -1
- flowllm-0.1.0/llmflow/app.py +0 -53
- flowllm-0.1.0/llmflow/config/config_parser.py +0 -80
- flowllm-0.1.0/llmflow/config/mock_config.yaml +0 -58
- flowllm-0.1.0/llmflow/embedding_model/__init__.py +0 -5
- flowllm-0.1.0/llmflow/enumeration/agent_state.py +0 -8
- flowllm-0.1.0/llmflow/llm/__init__.py +0 -5
- flowllm-0.1.0/llmflow/mcp_server.py +0 -110
- flowllm-0.1.0/llmflow/op/__init__.py +0 -10
- flowllm-0.1.0/llmflow/op/base_op.py +0 -125
- flowllm-0.1.0/llmflow/op/mock_op.py +0 -40
- flowllm-0.1.0/llmflow/op/react/react_v1_op.py +0 -88
- flowllm-0.1.0/llmflow/op/react/react_v1_prompt.yaml +0 -28
- flowllm-0.1.0/llmflow/op/vector_store/__init__.py +0 -13
- flowllm-0.1.0/llmflow/op/vector_store/recall_vector_store_op.py +0 -48
- flowllm-0.1.0/llmflow/op/vector_store/update_vector_store_op.py +0 -28
- flowllm-0.1.0/llmflow/op/vector_store/vector_store_action_op.py +0 -46
- flowllm-0.1.0/llmflow/pipeline/pipeline.py +0 -94
- flowllm-0.1.0/llmflow/pipeline/pipeline_context.py +0 -37
- flowllm-0.1.0/llmflow/schema/app_config.py +0 -69
- flowllm-0.1.0/llmflow/schema/experience.py +0 -144
- flowllm-0.1.0/llmflow/schema/message.py +0 -68
- flowllm-0.1.0/llmflow/schema/request.py +0 -32
- flowllm-0.1.0/llmflow/schema/response.py +0 -29
- flowllm-0.1.0/llmflow/service/__init__.py +0 -0
- flowllm-0.1.0/llmflow/service/llmflow_service.py +0 -96
- flowllm-0.1.0/llmflow/tool/__init__.py +0 -9
- flowllm-0.1.0/llmflow/tool/base_tool.py +0 -80
- flowllm-0.1.0/llmflow/tool/code_tool.py +0 -43
- flowllm-0.1.0/llmflow/tool/dashscope_search_tool.py +0 -162
- flowllm-0.1.0/llmflow/tool/mcp_tool.py +0 -77
- flowllm-0.1.0/llmflow/tool/tavily_search_tool.py +0 -109
- flowllm-0.1.0/llmflow/tool/terminate_tool.py +0 -23
- flowllm-0.1.0/llmflow/utils/__init__.py +0 -0
- flowllm-0.1.0/llmflow/utils/common_utils.py +0 -17
- flowllm-0.1.0/llmflow/utils/file_handler.py +0 -25
- flowllm-0.1.0/llmflow/utils/http_client.py +0 -156
- flowllm-0.1.0/llmflow/utils/op_utils.py +0 -102
- flowllm-0.1.0/llmflow/utils/registry.py +0 -33
- flowllm-0.1.0/llmflow/vector_store/__init__.py +0 -7
- flowllm-0.1.0/llmflow/vector_store/base_vector_store.py +0 -136
- {flowllm-0.1.0/llmflow → flowllm-0.1.1/flowllm/config}/__init__.py +0 -0
- {flowllm-0.1.0/llmflow/config → flowllm-0.1.1/flowllm/context}/__init__.py +0 -0
- {flowllm-0.1.0/llmflow → flowllm-0.1.1/flowllm}/enumeration/__init__.py +0 -0
- {flowllm-0.1.0/llmflow → flowllm-0.1.1/flowllm}/enumeration/chunk_enum.py +0 -0
- {flowllm-0.1.0/llmflow → flowllm-0.1.1/flowllm}/enumeration/http_enum.py +0 -0
- {flowllm-0.1.0/llmflow → flowllm-0.1.1/flowllm}/enumeration/role.py +0 -0
- {flowllm-0.1.0/llmflow/op/react → flowllm-0.1.1/flowllm/op/akshare}/__init__.py +0 -0
- {flowllm-0.1.0/llmflow/pipeline → flowllm-0.1.1/flowllm/schema}/__init__.py +0 -0
- {flowllm-0.1.0/llmflow → flowllm-0.1.1/flowllm}/schema/vector_node.py +0 -0
- {flowllm-0.1.0/llmflow/schema → flowllm-0.1.1/flowllm/utils}/__init__.py +0 -0
- {flowllm-0.1.0/llmflow → flowllm-0.1.1/flowllm}/utils/singleton.py +0 -0
- {flowllm-0.1.0 → flowllm-0.1.1}/flowllm.egg-info/dependency_links.txt +0 -0
- {flowllm-0.1.0 → flowllm-0.1.1}/setup.cfg +0 -0
@@ -186,7 +186,7 @@
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
187
187
|
identification within third-party archives.
|
188
188
|
|
189
|
-
Copyright 2024
|
189
|
+
Copyright 2024 FlowLLM
|
190
190
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
192
192
|
you may not use this file except in compliance with the License.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: flowllm
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.1
|
4
4
|
Summary: build llm flow
|
5
5
|
License: Apache License
|
6
6
|
Version 2.0, January 2004
|
@@ -190,7 +190,7 @@ License: Apache License
|
|
190
190
|
same "printed page" as the copyright notice for easier
|
191
191
|
identification within third-party archives.
|
192
192
|
|
193
|
-
Copyright 2024
|
193
|
+
Copyright 2024 FlowLLM
|
194
194
|
|
195
195
|
Licensed under the Apache License, Version 2.0 (the "License");
|
196
196
|
you may not use this file except in compliance with the License.
|
@@ -223,14 +223,15 @@ Requires-Dist: PyYAML>=6.0.2
|
|
223
223
|
Requires-Dist: Requests>=2.32.4
|
224
224
|
Requires-Dist: uvicorn>=0.34.3
|
225
225
|
Requires-Dist: setuptools>=75.0
|
226
|
+
Requires-Dist: akshare
|
226
227
|
Dynamic: license-file
|
227
228
|
|
228
|
-
#
|
229
|
+
# flowllm
|
229
230
|
|
230
231
|
[](https://www.python.org/downloads/)
|
231
232
|
[](https://opensource.org/licenses/Apache-2.0)
|
232
233
|
|
233
|
-
|
234
|
+
flowllm is a flexible large language model workflow framework that provides a modular pipeline architecture for building complex AI applications. The framework supports multiple LLM providers, vector storage backends, and tool integrations, enabling you to easily build Retrieval-Augmented Generation (RAG), intelligent agents, and other AI-powered applications.
|
234
235
|
|
235
236
|
## 🚀 Key Features
|
236
237
|
|
@@ -274,8 +275,8 @@ LLMFlow is a flexible large language model workflow framework that provides a mo
|
|
274
275
|
|
275
276
|
```bash
|
276
277
|
# Clone the repository
|
277
|
-
git clone https://github.com/your-username/
|
278
|
-
cd
|
278
|
+
git clone https://github.com/your-username/flowllm.git
|
279
|
+
cd flowllm
|
279
280
|
|
280
281
|
# Install dependencies
|
281
282
|
pip install -e .
|
@@ -314,7 +315,7 @@ DASHSCOPE_API_KEY=sk-your-dashscope-key
|
|
314
315
|
### 1. Start HTTP Service
|
315
316
|
|
316
317
|
```bash
|
317
|
-
|
318
|
+
flowllm \
|
318
319
|
http_service.port=8001 \
|
319
320
|
llm.default.model_name=qwen3-32b \
|
320
321
|
embedding_model.default.model_name=text-embedding-v4 \
|
@@ -324,7 +325,7 @@ llmflow \
|
|
324
325
|
### 2. Start MCP Server
|
325
326
|
|
326
327
|
```bash
|
327
|
-
|
328
|
+
flowllm_mcp \
|
328
329
|
mcp_transport=stdio \
|
329
330
|
http_service.port=8001 \
|
330
331
|
llm.default.model_name=qwen3-32b \
|
@@ -361,7 +362,7 @@ print(response.json())
|
|
361
362
|
|
362
363
|
### Pipeline Configuration Syntax
|
363
364
|
|
364
|
-
|
365
|
+
flowllm uses an intuitive string syntax to define operation pipelines:
|
365
366
|
|
366
367
|
```yaml
|
367
368
|
api:
|
@@ -444,7 +445,7 @@ vector_store:
|
|
444
445
|
└───────────────────────┼───────────────────────┘
|
445
446
|
│
|
446
447
|
┌─────────────────┐
|
447
|
-
│
|
448
|
+
│ flowllm Service │
|
448
449
|
└─────────────────┘
|
449
450
|
│
|
450
451
|
┌─────────────────┐
|
@@ -475,8 +476,9 @@ Request → Configuration → Pipeline → Operations → Tools/VectorStore →
|
|
475
476
|
### Custom Operations
|
476
477
|
|
477
478
|
```python
|
478
|
-
from
|
479
|
-
from
|
479
|
+
from old.op import OP_REGISTRY
|
480
|
+
from old.op.base_op import BaseOp
|
481
|
+
|
480
482
|
|
481
483
|
@OP_REGISTRY.register()
|
482
484
|
class CustomOp(BaseOp):
|
@@ -484,10 +486,10 @@ class CustomOp(BaseOp):
|
|
484
486
|
# Implement your custom logic
|
485
487
|
request = self.context.request
|
486
488
|
response = self.context.response
|
487
|
-
|
489
|
+
|
488
490
|
# Process request
|
489
491
|
result = self.process_data(request.query)
|
490
|
-
|
492
|
+
|
491
493
|
# Update response
|
492
494
|
response.metadata["custom_result"] = result
|
493
495
|
```
|
@@ -495,8 +497,9 @@ class CustomOp(BaseOp):
|
|
495
497
|
### Custom Tools
|
496
498
|
|
497
499
|
```python
|
498
|
-
from
|
499
|
-
from
|
500
|
+
from old.tool import TOOL_REGISTRY
|
501
|
+
from old.tool.base_tool import BaseTool
|
502
|
+
|
500
503
|
|
501
504
|
@TOOL_REGISTRY.register()
|
502
505
|
class CustomTool(BaseTool):
|
@@ -509,7 +512,7 @@ class CustomTool(BaseTool):
|
|
509
512
|
},
|
510
513
|
"required": ["input"]
|
511
514
|
}
|
512
|
-
|
515
|
+
|
513
516
|
def _execute(self, input: str, **kwargs):
|
514
517
|
# Implement tool logic
|
515
518
|
return f"Processing result: {input}"
|
@@ -518,15 +521,16 @@ class CustomTool(BaseTool):
|
|
518
521
|
### Custom Vector Stores
|
519
522
|
|
520
523
|
```python
|
521
|
-
from
|
522
|
-
from
|
524
|
+
from old.vector_store import VECTOR_STORE_REGISTRY
|
525
|
+
from old.vector_store.base_vector_store import BaseVectorStore
|
526
|
+
|
523
527
|
|
524
528
|
@VECTOR_STORE_REGISTRY.register("custom_store")
|
525
529
|
class CustomVectorStore(BaseVectorStore):
|
526
530
|
def search(self, query: str, top_k: int = 10, **kwargs):
|
527
531
|
# Implement search logic
|
528
532
|
pass
|
529
|
-
|
533
|
+
|
530
534
|
def insert(self, nodes: List[VectorNode], **kwargs):
|
531
535
|
# Implement insertion logic
|
532
536
|
pass
|
@@ -542,7 +546,7 @@ pytest
|
|
542
546
|
pytest tests/test_pipeline.py
|
543
547
|
|
544
548
|
# Generate coverage report
|
545
|
-
pytest --cov=
|
549
|
+
pytest --cov=flowllm tests/
|
546
550
|
```
|
547
551
|
|
548
552
|
## 🤝 Contributing
|
@@ -565,11 +569,11 @@ pip install -e ".[dev]"
|
|
565
569
|
pre-commit install
|
566
570
|
|
567
571
|
# Run code formatting
|
568
|
-
black
|
569
|
-
isort
|
572
|
+
black flowllm/
|
573
|
+
isort flowllm/
|
570
574
|
|
571
575
|
# Run type checking
|
572
|
-
mypy
|
576
|
+
mypy flowllm/
|
573
577
|
```
|
574
578
|
|
575
579
|
## 📚 Documentation
|
@@ -582,7 +586,7 @@ mypy llmflow/
|
|
582
586
|
|
583
587
|
## 🐛 Bug Reports
|
584
588
|
|
585
|
-
If you find bugs or have feature requests, please create an issue on [GitHub Issues](https://github.com/your-username/
|
589
|
+
If you find bugs or have feature requests, please create an issue on [GitHub Issues](https://github.com/your-username/flowllm/issues).
|
586
590
|
|
587
591
|
## 📄 License
|
588
592
|
|
@@ -590,8 +594,8 @@ This project is licensed under the Apache License 2.0. See the [LICENSE](LICENSE
|
|
590
594
|
|
591
595
|
## 🙏 Acknowledgments
|
592
596
|
|
593
|
-
Thanks to all developers and community members who have contributed to the
|
597
|
+
Thanks to all developers and community members who have contributed to the flowllm project.
|
594
598
|
|
595
599
|
---
|
596
600
|
|
597
|
-
**
|
601
|
+
**flowllm** - Making AI workflow development simple and powerful 🚀
|
@@ -1,9 +1,9 @@
|
|
1
|
-
#
|
1
|
+
# flowllm
|
2
2
|
|
3
3
|
[](https://www.python.org/downloads/)
|
4
4
|
[](https://opensource.org/licenses/Apache-2.0)
|
5
5
|
|
6
|
-
|
6
|
+
flowllm is a flexible large language model workflow framework that provides a modular pipeline architecture for building complex AI applications. The framework supports multiple LLM providers, vector storage backends, and tool integrations, enabling you to easily build Retrieval-Augmented Generation (RAG), intelligent agents, and other AI-powered applications.
|
7
7
|
|
8
8
|
## 🚀 Key Features
|
9
9
|
|
@@ -47,8 +47,8 @@ LLMFlow is a flexible large language model workflow framework that provides a mo
|
|
47
47
|
|
48
48
|
```bash
|
49
49
|
# Clone the repository
|
50
|
-
git clone https://github.com/your-username/
|
51
|
-
cd
|
50
|
+
git clone https://github.com/your-username/flowllm.git
|
51
|
+
cd flowllm
|
52
52
|
|
53
53
|
# Install dependencies
|
54
54
|
pip install -e .
|
@@ -87,7 +87,7 @@ DASHSCOPE_API_KEY=sk-your-dashscope-key
|
|
87
87
|
### 1. Start HTTP Service
|
88
88
|
|
89
89
|
```bash
|
90
|
-
|
90
|
+
flowllm \
|
91
91
|
http_service.port=8001 \
|
92
92
|
llm.default.model_name=qwen3-32b \
|
93
93
|
embedding_model.default.model_name=text-embedding-v4 \
|
@@ -97,7 +97,7 @@ llmflow \
|
|
97
97
|
### 2. Start MCP Server
|
98
98
|
|
99
99
|
```bash
|
100
|
-
|
100
|
+
flowllm_mcp \
|
101
101
|
mcp_transport=stdio \
|
102
102
|
http_service.port=8001 \
|
103
103
|
llm.default.model_name=qwen3-32b \
|
@@ -134,7 +134,7 @@ print(response.json())
|
|
134
134
|
|
135
135
|
### Pipeline Configuration Syntax
|
136
136
|
|
137
|
-
|
137
|
+
flowllm uses an intuitive string syntax to define operation pipelines:
|
138
138
|
|
139
139
|
```yaml
|
140
140
|
api:
|
@@ -217,7 +217,7 @@ vector_store:
|
|
217
217
|
└───────────────────────┼───────────────────────┘
|
218
218
|
│
|
219
219
|
┌─────────────────┐
|
220
|
-
│
|
220
|
+
│ flowllm Service │
|
221
221
|
└─────────────────┘
|
222
222
|
│
|
223
223
|
┌─────────────────┐
|
@@ -248,8 +248,9 @@ Request → Configuration → Pipeline → Operations → Tools/VectorStore →
|
|
248
248
|
### Custom Operations
|
249
249
|
|
250
250
|
```python
|
251
|
-
from
|
252
|
-
from
|
251
|
+
from old.op import OP_REGISTRY
|
252
|
+
from old.op.base_op import BaseOp
|
253
|
+
|
253
254
|
|
254
255
|
@OP_REGISTRY.register()
|
255
256
|
class CustomOp(BaseOp):
|
@@ -257,10 +258,10 @@ class CustomOp(BaseOp):
|
|
257
258
|
# Implement your custom logic
|
258
259
|
request = self.context.request
|
259
260
|
response = self.context.response
|
260
|
-
|
261
|
+
|
261
262
|
# Process request
|
262
263
|
result = self.process_data(request.query)
|
263
|
-
|
264
|
+
|
264
265
|
# Update response
|
265
266
|
response.metadata["custom_result"] = result
|
266
267
|
```
|
@@ -268,8 +269,9 @@ class CustomOp(BaseOp):
|
|
268
269
|
### Custom Tools
|
269
270
|
|
270
271
|
```python
|
271
|
-
from
|
272
|
-
from
|
272
|
+
from old.tool import TOOL_REGISTRY
|
273
|
+
from old.tool.base_tool import BaseTool
|
274
|
+
|
273
275
|
|
274
276
|
@TOOL_REGISTRY.register()
|
275
277
|
class CustomTool(BaseTool):
|
@@ -282,7 +284,7 @@ class CustomTool(BaseTool):
|
|
282
284
|
},
|
283
285
|
"required": ["input"]
|
284
286
|
}
|
285
|
-
|
287
|
+
|
286
288
|
def _execute(self, input: str, **kwargs):
|
287
289
|
# Implement tool logic
|
288
290
|
return f"Processing result: {input}"
|
@@ -291,15 +293,16 @@ class CustomTool(BaseTool):
|
|
291
293
|
### Custom Vector Stores
|
292
294
|
|
293
295
|
```python
|
294
|
-
from
|
295
|
-
from
|
296
|
+
from old.vector_store import VECTOR_STORE_REGISTRY
|
297
|
+
from old.vector_store.base_vector_store import BaseVectorStore
|
298
|
+
|
296
299
|
|
297
300
|
@VECTOR_STORE_REGISTRY.register("custom_store")
|
298
301
|
class CustomVectorStore(BaseVectorStore):
|
299
302
|
def search(self, query: str, top_k: int = 10, **kwargs):
|
300
303
|
# Implement search logic
|
301
304
|
pass
|
302
|
-
|
305
|
+
|
303
306
|
def insert(self, nodes: List[VectorNode], **kwargs):
|
304
307
|
# Implement insertion logic
|
305
308
|
pass
|
@@ -315,7 +318,7 @@ pytest
|
|
315
318
|
pytest tests/test_pipeline.py
|
316
319
|
|
317
320
|
# Generate coverage report
|
318
|
-
pytest --cov=
|
321
|
+
pytest --cov=flowllm tests/
|
319
322
|
```
|
320
323
|
|
321
324
|
## 🤝 Contributing
|
@@ -338,11 +341,11 @@ pip install -e ".[dev]"
|
|
338
341
|
pre-commit install
|
339
342
|
|
340
343
|
# Run code formatting
|
341
|
-
black
|
342
|
-
isort
|
344
|
+
black flowllm/
|
345
|
+
isort flowllm/
|
343
346
|
|
344
347
|
# Run type checking
|
345
|
-
mypy
|
348
|
+
mypy flowllm/
|
346
349
|
```
|
347
350
|
|
348
351
|
## 📚 Documentation
|
@@ -355,7 +358,7 @@ mypy llmflow/
|
|
355
358
|
|
356
359
|
## 🐛 Bug Reports
|
357
360
|
|
358
|
-
If you find bugs or have feature requests, please create an issue on [GitHub Issues](https://github.com/your-username/
|
361
|
+
If you find bugs or have feature requests, please create an issue on [GitHub Issues](https://github.com/your-username/flowllm/issues).
|
359
362
|
|
360
363
|
## 📄 License
|
361
364
|
|
@@ -363,8 +366,8 @@ This project is licensed under the Apache License 2.0. See the [LICENSE](LICENSE
|
|
363
366
|
|
364
367
|
## 🙏 Acknowledgments
|
365
368
|
|
366
|
-
Thanks to all developers and community members who have contributed to the
|
369
|
+
Thanks to all developers and community members who have contributed to the flowllm project.
|
367
370
|
|
368
371
|
---
|
369
372
|
|
370
|
-
**
|
373
|
+
**flowllm** - Making AI workflow development simple and powerful 🚀
|
@@ -0,0 +1,12 @@
|
|
1
|
+
from flowllm import embedding_model
|
2
|
+
from flowllm import flow_engine
|
3
|
+
from flowllm import llm
|
4
|
+
from flowllm import op
|
5
|
+
from flowllm import service
|
6
|
+
from flowllm import storage
|
7
|
+
|
8
|
+
from .app import main
|
9
|
+
|
10
|
+
__version__ = "0.1.1"
|
11
|
+
|
12
|
+
__all__ = ["main"]
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import sys
|
2
|
+
|
3
|
+
from flowllm.service.base_service import BaseService
|
4
|
+
from flowllm.utils.common_utils import load_env
|
5
|
+
|
6
|
+
load_env()
|
7
|
+
|
8
|
+
from flowllm.config.pydantic_config_parser import PydanticConfigParser
|
9
|
+
from flowllm.schema.service_config import ServiceConfig
|
10
|
+
from flowllm.context.service_context import C
|
11
|
+
|
12
|
+
|
13
|
+
def main():
|
14
|
+
config_parser = PydanticConfigParser(ServiceConfig)
|
15
|
+
service_config: ServiceConfig = config_parser.parse_args(*sys.argv[1:])
|
16
|
+
service_cls = C.resolve_service(service_config.backend)
|
17
|
+
service: BaseService = service_cls(service_config)
|
18
|
+
service()
|
19
|
+
|
20
|
+
if __name__ == "__main__":
|
21
|
+
main()
|
22
|
+
|
23
|
+
|
24
|
+
# python -m build
|
25
|
+
# twine upload dist/*
|
@@ -0,0 +1,82 @@
|
|
1
|
+
# default config.yaml
|
2
|
+
backend: mcp
|
3
|
+
language: ""
|
4
|
+
thread_pool_max_workers: 32
|
5
|
+
ray_max_workers: 8
|
6
|
+
|
7
|
+
mcp:
|
8
|
+
transport: sse
|
9
|
+
host: "0.0.0.0"
|
10
|
+
port: 8001
|
11
|
+
|
12
|
+
http:
|
13
|
+
host: "0.0.0.0"
|
14
|
+
port: 8001
|
15
|
+
timeout_keep_alive: 600
|
16
|
+
limit_concurrency: 64
|
17
|
+
|
18
|
+
|
19
|
+
flow_engine:
|
20
|
+
backend: simple
|
21
|
+
|
22
|
+
|
23
|
+
flow:
|
24
|
+
get_a_stock_infos:
|
25
|
+
flow_content: get_ak_a_code_op >> get_ak_a_info_op >> get_ak_a_spot_op >> get_ak_a_money_flow_op >> get_ak_a_financial_info_op >> merge_ak_a_info_op
|
26
|
+
description: "Retrieve the A-share stock codes from the query, and fetch information about these stocks, including company basic information, current stock price and its change percentage, capital inflow and outflow data for the most recent day, and financial information from the latest quarter."
|
27
|
+
input_schema:
|
28
|
+
query:
|
29
|
+
type: "str"
|
30
|
+
description: "user question"
|
31
|
+
|
32
|
+
get_a_stock_news:
|
33
|
+
flow_content: get_ak_a_code_op >> get_ak_a_news_op >> merge_ak_a_info_op
|
34
|
+
description: "Retrieve the A-share stock codes from the query, and obtain the latest news information about these stocks."
|
35
|
+
input_schema:
|
36
|
+
query:
|
37
|
+
type: "str"
|
38
|
+
description: "user question"
|
39
|
+
|
40
|
+
mock_flow:
|
41
|
+
flow_content: mock1_op>>((mock4_op>>mock2_op)|mock5_op)>>(mock3_op|mock6_op)
|
42
|
+
description: "mock flow"
|
43
|
+
input_schema:
|
44
|
+
a:
|
45
|
+
type: "str"
|
46
|
+
description: "mock attr a"
|
47
|
+
required: true
|
48
|
+
b:
|
49
|
+
type: "str"
|
50
|
+
description: "mock attr b"
|
51
|
+
required: true
|
52
|
+
|
53
|
+
op:
|
54
|
+
mock1_op:
|
55
|
+
backend: mock1_op
|
56
|
+
llm: default
|
57
|
+
vector_store: default
|
58
|
+
|
59
|
+
llm:
|
60
|
+
default:
|
61
|
+
backend: openai_compatible
|
62
|
+
model_name: qwen3-30b-a3b-thinking-2507
|
63
|
+
params:
|
64
|
+
temperature: 0.6
|
65
|
+
qwen3_30b_instruct:
|
66
|
+
backend: openai_compatible
|
67
|
+
model_name: qwen3-30b-a3b-instruct-2507
|
68
|
+
|
69
|
+
embedding_model:
|
70
|
+
default:
|
71
|
+
backend: openai_compatible
|
72
|
+
model_name: text-embedding-v4
|
73
|
+
params:
|
74
|
+
dimensions: 1024
|
75
|
+
|
76
|
+
vector_store:
|
77
|
+
default:
|
78
|
+
backend: elasticsearch
|
79
|
+
embedding_model: default
|
80
|
+
params:
|
81
|
+
hosts: "http://localhost:9200"
|
82
|
+
|