AIGC学习笔记(6)——AI大模型开发工程师

文章目录

AI大模型开发工程师

005 OpenAI大模型案例实践

1 AI 翻译助手需求分析

项目起源
市场价格和市场前景
基于大模型的翻译软件
核心功能设计

2 AI 翻译助手架构设计

架构设计
代码结构设计

3 AI 翻译助手核心功能

文档解析
文档操作
python 复制代码
## 导入操作word文档和PDF文档的依赖库
! pip install pdfplumber
PDF文档操作
  • 读取文档
python 复制代码
import pdfplumber
pdf = pdfplumber.open("测试文档/test1.pdf")
pages = pdf.pages

# 读取所有页面的文本内容
with pdfplumber.open("测试文档/test1.pdf") as pdf:
    for page in pdf.pages:
        print(page.extract_text())

# 获取单页文本(保留布局)
text = pages[0].extract_text(layout=True)
text
表格操作
python 复制代码
table = pages[1].extract_table()
table

import pandas as pd

df = pd.DataFrame(table[1:], columns=table[0])

print(df)
图片操作
python 复制代码
pages[2].images

img = pages[2].images[0]
bbox = (img["x0"], img["top"], img["x1"], img["bottom"])
cropped_page = pages[2].crop(bbox)
cropped_page.to_image()
Prompt封装
  • 方式一
  • 方式二:使用 LangChain

4 AI 翻译助手代码落地

5 AI 翻译助手项目总结

相关推荐
phltxy5 小时前
LangChain从模型输出到RAG数据管道实战
服务器·人工智能·深度学习·语言模型·langchain
longxibo10 小时前
第 14 章 金融行业私有化AI落地案例
人工智能·金融·aigc
闲猫12 小时前
LangChain / Core components / Models
开发语言·python·langchain
早点睡啊Y14 小时前
深入学 LangChain 官方文档(一):总览、安装与快速开始
linux·服务器·langchain
「QT(C++)开发工程师」14 小时前
AI Agent 核心组件
人工智能·ai·aigc·ai编程·ai写作
李剑一17 小时前
vibe coding开发的系统无法运维?全面AI的公司迟早要在这上面跌个大跟头
aigc·openai·ai编程
知行合一。。。17 小时前
LangChain--08--中间件(Middleware)
中间件·langchain
fenglllle17 小时前
langchain简单对话demo
人工智能·langchain
TrisighT18 小时前
让 Claude 半夜自己审 PR:Headless 模式 + GitHub Actions 实测
aigc·agent·ai编程
春风野草18 小时前
AI Agent 跑长任务,不能只靠一个 async:AgentTask 和 AgentStep 状态机实战
aigc·ai编程