Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: devstream-io/devstream
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.13.0
Choose a base ref
...
head repository: devstream-io/devstream
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

There isn’t anything to compare.

v0.13.0 and main are entirely different commit histories.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# chatflow
# devstream
Intelligent Workflow Engine Driven by Natural Language.
12 changes: 6 additions & 6 deletions README.zh.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Chatflow 智能工作流引擎
# Devstream 智能工作流引擎

> 注意:DevChat IDE 插件尚未迁移至本实现,在当前插件中创建智能工作流请参见[文档说明](https://docs.devchat.ai/zh/quick-start/create_workflow)
本实现遵循[《Chatflow 接口规范》版本v1.0.0](specs/interface-v1.0.0.zh.md)。未实现 [`shell-python` 运行时系统](specs/runtime-v0.1.0.zh.md)的 Python 环境和包自动管理能力。
本实现遵循[Devstream 接口规范》版本v1.0.0](specs/interface-v1.0.0.zh.md)。未实现 [`shell-python` 运行时系统](specs/runtime-v0.1.0.zh.md)的 Python 环境和包自动管理能力。

本工作流引擎采用 Python 编程语言实现,可作为 Python 包被用户脚本或其他工作流引入和使用。引擎默认使用调用时所处 Python 环境的解释器。

@@ -11,7 +11,7 @@
本项目 `/demo` 目录是一个包含了工作流 `/hello_world` 实现的示例,下面操作步骤可实现对该工作流的调用。命令行以 Linux 或 macOS 操作系统终端为例。

1. 设置运行时依赖的环境变量,在终端执行如下命令:
- `export $CHATFLOW_BASE=/path/to/demo/`,其中 `/path/to/demo/` 替换为本地 `demo` 目录的完整路径。
- `export DEVSTREAM_BASE=/path/to/demo/`,其中 `/path/to/demo/` 替换为本地 `demo` 目录的完整路径。
2. 本地应安装好 Python 环境,并在本地 `demo` 目录下的 `settings.yml` 文件中注册,该文件形如:

```yaml
@@ -22,9 +22,9 @@
其中 `/path/to/python/bin` 替换为本地 Python 环境解释器的完整路径。
3. 我们假设一个用户脚本或另外的工作流希望调用 `/hello_world`,那么 [`/demo/caller.py`](demo/caller.py) 是一个实现这种调用的实例:
```python
import chatflow
import devstream
chatflow.call("/hello_world", "This is some user input.")
devstream.call("/hello_world", "This is some user input.")
```
4. 在终端中执行如下命令行,可实测调用 `/hello_world` 的结果:
- `python /path/to/caller.py`,其中 `python` 指向终端当前所处的 Python 环境,也是运行 Chatflow 引擎的环境;`/path/to/caller.py` 替换为脚本实际所处的路径。
- `python /path/to/caller.py`,其中 `python` 指向终端当前所处的 Python 环境,也是运行 Devstream 引擎的环境;`/path/to/caller.py` 替换为脚本实际所处的路径。
2 changes: 1 addition & 1 deletion demo/base/usr/my_namespace/hello_world/hello_world.py
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@


def main():
print("Hello world from chatflow demo.")
print("Hello world from devstream demo.")
if len(sys.argv) > 1:
print(f"User input: {sys.argv[1]}")
else:
10 changes: 5 additions & 5 deletions demo/caller.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import os

# Set CHATFLOW_BASE to /demo/base
# Set DEVSTREAM_BASE to /demo/base
demo_base = os.path.join(os.path.dirname(__file__), "base")
os.environ["CHATFLOW_BASE"] = demo_base
os.environ["DEVSTREAM_BASE"] = demo_base

import chatflow # noqa: E402
import devstream # noqa: E402


def main():
# res = chatflow.call("/hello_world", "--help")
# res = devstream.call("/hello_world", "--help")
# print(res)
_ = chatflow.call("/hello_world", "This is some user input.")
_ = devstream.call("/hello_world", "This is some user input.")


if __name__ == "__main__":
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion chatflow/env_vars.py → devstream/env_vars.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import os

CHATFLOW_BASE = os.environ.get("CHATFLOW_BASE", None)
DEVSTREAM_BASE = os.environ.get("DEVSTREAM_BASE", None)
MAMBA_BIN_PATH = os.environ.get("MAMBA_BIN_PATH", "")
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions chatflow/path.py → devstream/path.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os

from .env_vars import CHATFLOW_BASE
from .env_vars import DEVSTREAM_BASE

# -------------------------------
# devchat basic paths
@@ -14,7 +14,7 @@
# -------------------------------
# workflow paths
# -------------------------------
WORKFLOWS_BASE = CHATFLOW_BASE or os.path.join(CHAT_DIR, DEVCHAT_WORKFLOWS_BASE_NAME)
WORKFLOWS_BASE = DEVSTREAM_BASE or os.path.join(CHAT_DIR, DEVCHAT_WORKFLOWS_BASE_NAME)

SYS_WORKFLOWS = os.path.join(WORKFLOWS_BASE, "sys")
COMMUNITY_WORKFLOWS = os.path.join(WORKFLOWS_BASE, "comm")
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[project]
name = "chatflow"
name = "devstream"
version = "0.1.0"
description = ""
readme = "README.md"
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.