惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
aimingoo的专栏
aimingoo的专栏
Martin Fowler
Martin Fowler
C
Check Point Blog
G
Google Developers Blog
V
Visual Studio Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Google DeepMind News
Google DeepMind News
人人都是产品经理
人人都是产品经理
有赞技术团队
有赞技术团队
MongoDB | Blog
MongoDB | Blog
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
D
Docker
Hugging Face - Blog
Hugging Face - Blog
The GitHub Blog
The GitHub Blog
博客园 - 三生石上(FineUI控件)
A
About on SuperTechFans
Recent Announcements
Recent Announcements
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
阮一峰的网络日志
阮一峰的网络日志
Stack Overflow Blog
Stack Overflow Blog
Vercel News
Vercel News

博客园 - 大树2

Cumora AI Agent 协同工作平台 Dify用于建 AI 应用(chat,agent,工作流,RAG,MCP, web App)的平台 国内主流大模型的API的申请地址 AI 智能体架构设计的12条原则 AI Agent 是如何一步步开发完成的 Crew AI 多agent 技术媒体编辑部:批量生产科技文章 demo 使用CrewAI 多agent 协作,创作高考优秀作文的demo 使用本地ollama 部署的模型,不需要token,使用ollama及第三方向量模型 RAG 中英双语 Embedding 嵌入模型 langgraph LLM 大模型 做意图分类 llamaindex 开源 RAG 框架 使用汇总 面向多模态检索的向量数据库对比分析和技术选型Chroma,PGVector,Milvus UV python的包和环境管理工具 cursor AI工具配合编程总结 Python conda 调用AI 模型 扣子 工作流程开发 AI图片,图像工具,创作工具 安装openclaw ClawHub CLI openclaw skills 安装 的三种方式:命令安装,手动下载安装,web ui安装 openclaw 学习资源 与三种沙箱模式的区别及配置 Cursor的四大模式:Agent、Plan、Debug、Ask,到底怎么用,能让效率翻倍 你能想到的openclaw 落地应用场景有哪些? windows cmd安装openclaw openclaw 安装手册及链接飞书 conda安装,langchain使用,国内提供大模型api调用的平台 langChain 大模型开发知识汇总 AI大模型应用开发知识体系 Nacos核心参数配置,解决某个应用注册后没有心跳问题,可能是将该服务配置为临时服务 腾讯云:购买域名,域名解析,域名备案,安全组,SSL证书,配置ssl证书,nginx转发 ECS云服务器配置可以远程访问,解决1130问题
FastApi python, React TS 快速构建AI agent开发
大树2 · 2026-06-06 · via 博客园 - 大树2

----------------------------------react ts -------------------------------

npx creat-react-app react-basic
npm run start

JSX:在js中编写HTML,js表达式,列表渲染,list.map(),函数,
组件:首字母大写的函数
useState 状态变量:是一个react hook函数 :setCount(),setForm()
css样式:className="foo"
list.filter(item=>item.userid !==userid)
babeljs.io

ant design:蚂蚁PC组件库
npm install antd --save
import {Button} from antd

router包,页面路由组件
npm -i react-router-dom

@提示符路径:webpack别名 craco
vscode别名jsconfig.json

Form
npm i axios
根域名配置
超时时间
请求拦截器/响应拦截器

redux 管理token

token持久化: redux + localstorage
初始化token:

打包发表
npm run build
本地测试
npm install -g serve
serve -s build

路由懒加载:按需加载:lazy,suspense

包体积分析:source-map-explorer

包优化:CDN 就近访问

https://www.bilibili.com/video/BV1ZB4y1Z7o8?spm_id_from=333.788.player.switch&vd_source=0095e0bfb5fc84322a9666fcd01fc77d&p=84

使用vite创建项目 react + ts 项目:
npm create vite@latest my-react-app -- --template react-ts
npm i
npm run dev

----------------------------fastapi python ---------------
FastApi python web框架

uvicorn main:app reload

source .venv/bin/activate 进入创建好的虚拟环境
deactivate 退出当前虚拟环境
python --version
pip install --upgrade pip 升级pip
pip install fastapi[all]==0.111.0
pip install -r requirements.txt
fastapi --version
运行fastapi:
uvicorn main:app --port 9099 --reload

from pydantic import BaseModel
Field

FASTAPI内置响应类型:
JSONResponse 默认返回json数据 {“key":"value"}
HTMResponse
PlainTextResponse
FileResponse
StreamingResponse
RedirectResponse

from pydantic import BaseModel

class News(BaseMode):
id: int
title: str
content:str

@app.get("/news/{id}",response_model=News)
async def get_news(id: int):
return {
"id": id,
"title”:f"这是第{id}本书”,
"content”:"这是一本好书”
}

@app.get("/html", response_class=HTMLResponse]
async def get_html():
return "

这是标题

"

@app.get("/file")
async def get_file():
file_path = "./files/1.jpeg"
return FileResponse(file_path)

HTTPException:

@app.get("/news/{idl")
async def get_news(id: int):id_list = [1, 2, 3, 4, 5, 6]if id not in id_list:
raise HTTPException(status_code=404,detail="您查找的新闻不存在)
return {"id": id}

orm: sqlalchemy,aiomysql