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 翻译助手项目总结

相关推荐
ThatMonth33 分钟前
Langchain 入门教程五:提示词Prompts
langchain
中微极客1 小时前
用LangChain 0.3构建生产级RAG与Agent:从API集成到Streamlit部署
数据库·人工智能·langchain
海上彼尚2 小时前
Nodejs也能写Agent - 22.LangGraph篇 - 上下文工程
前端·javascript·人工智能·langchain·node.js
深蓝AI2 小时前
Grok Build 实战:xAI 开源编码智能体 CLI,原生 MCP 打通工具链
aigc·ai编程
程序员麻辣烫3 小时前
Memory向量记忆系统4-文本向量化
后端·aigc
程序员麻辣烫3 小时前
Memory向量记忆系统3-数据选取
后端·aigc
程序员麻辣烫3 小时前
Memory向量记忆系统2-SQLite
后端·aigc
神奇霸王龙4 小时前
Gemini CLI 中转站配置使用教程
人工智能·ai·ai作画·aigc·ai编程·gemini·goolge
KaneLogger5 小时前
花了2天写了个全平台的技能管理工具
aigc·agent·ai编程
atbigapp.com5 小时前
一次踩坑如何变成团队记忆:智忆 Capture → Review → Recall 实战
aigc·ai编程