Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xuchunyang/learn-qianfan-livewire
学习用 wire:stream 开发百度文心一言聊天机器人
https://github.com/xuchunyang/learn-qianfan-livewire
Last synced: about 1 month ago
JSON representation
学习用 wire:stream 开发百度文心一言聊天机器人
- Host: GitHub
- URL: https://github.com/xuchunyang/learn-qianfan-livewire
- Owner: xuchunyang
- Created: 2023-12-10T15:45:59.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-12T12:18:47.000Z (about 1 year ago)
- Last Synced: 2024-10-16T01:45:56.009Z (3 months ago)
- Language: PHP
- Homepage: https://learn-qianfan-livewire.xuchunyang.cn/
- Size: 1.02 MB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# wire:stream + 文心一言
我开发了一个聊天机器人,使用了 Livewire 的 `wire:stream` 功能。这个机器人集成了百度的文心一言 API。
![](CleanShot%202023-12-11%20at%[email protected])
## 用到主要工具
| 工具 | 用途 |
|---------------------|-----------------------------------|
| wire:stream | 后端发送 SSE、前端渲染 SSE |
| symfony/http-client | 充当 SSE 客户端,解析来自百度 API 的 stream 返回 |
| laravel-markdown | 从后端渲染 Markdown 为 HTML |