wurui bb8e3dbe00 feat: system prompt supports backend Overwrite and Prefix (#917) | 6 天之前 | |
---|---|---|
.. | ||
0-basic | 7 月之前 | |
1-pipeline | 6 天之前 | |
10-ai | 6 天之前 | |
2-iopipe | 6 天之前 | |
3-multi-sfn | 7 月之前 | |
4-cascading-zipper | 9 月之前 | |
5-backflow | 10 月之前 | |
6-mesh | 9 月之前 | |
7-wasm | 6 天之前 | |
8-deno | 1 年之前 | |
9-cli | 6 天之前 | |
a-target-and-cron | 7 月之前 | |
uppercase | 1 年之前 | |
README.md | 1 年之前 | |
Taskfile.yaml | 1 年之前 | |
config.yaml | 1 年之前 | |
tidy_go_mod.sh | 2 月之前 |
$ task -t ../Taskfile.yml cli:install
All examples can be run by Task, following the Install Task, execute task -l
in this directory will list all the examples.
$ task -l |grep example
* example-backflow: Backflow usage
* example-basic: YoMo basic usage
* example-cascading-zipper: Cascading zippers
* example-iopipe: IO Pipe
* example-multi-sfn: Multiple stream functions
* example-pipeline: Unix pipeline to cloud
* example-mesh: Edge mesh
* example-wasm: YoMo Stream Function using WebAssembly
* example-deno: YoMo Stream Function using Deno
* example-cli: Use the CLI to run stream functions
can run each example directly by task example-basic
, task example-cascading-zipper
and etc.
/dev/urandom
) and use yomo-source to send the streams over cloud.io.Copy()
to pipe the local streams (f.e. /dev/urandom
) to yomo-source.This feature is experimental.
source := yomo.NewSource(
"yomo-source",
"127.0.0.1:9000",
// set observe data tags, 0x34, 0x35 is sfn return data tags
yomo.WithObserveDataTags(0x34, 0x35),
)
// set receive handler
source.SetReceiveHandler(func(tag byte, data []byte) {
logger.Printf("[source] ♻️ receive backflow: tag=%#v, data=%s", tag, data)
// TODO:
})