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

相关推荐
ZWZhangYu12 小时前
【LangChain专栏】LangChain 调用Ollama本地大模型
langchain
njsgcs13 小时前
langchain+vlm示例
windows·python·langchain
勇气要爆发13 小时前
LangGraph 实战:10分钟打造带“人工审批”的智能体流水线 (Python + LangChain)
开发语言·python·langchain
得一录14 小时前
蒸汽、钢铁与无限心智(Steam, Steel, and Infinite Minds)全文
人工智能·aigc
光的方向_1 天前
ChatGPT提示工程入门 Prompt 03-迭代式提示词开发
人工智能·chatgpt·prompt·aigc
Dontla1 天前
黑马大模型RAG与Agent智能体实战教程LangChain提示词——32、RAG项目(服装商品智能客服)——案例介绍(离线流程、在线流程)
langchain
用户5191495848451 天前
Symfony PATH_INFO 解析缺陷导致授权绕过漏洞修复指南
人工智能·aigc
阿坡RPA1 天前
OpenClaw多Agent协作踩坑实录:从翻车到跑通的全记录
人工智能·aigc
芒果不茫QAQ1 天前
Upstash Vector 免费版完整使用指南
python·aigc·embedding·rag·upstash
DevilSeagull2 天前
LangChain & LangGraph 介绍
人工智能·程序人生·langchain·大模型·llm·vibe coding