由于AI训练的特殊性,现阶段大模型都存在以下三个问题:
- 大部分大模型都是瞎子
- 所有大模型都是离线的
- 所有大模型都是没有记忆的
针对这三个问题,市面上有非常多的工程的解决方案,但是都比较繁琐。
在302.AI平台,为了让开发者和用户可以快速地解决这几个问题,我们在API调用层面做了几个升级,下面就来详细的讲一讲。
超便捷为大模型装上眼睛
大模型在行业里可以分为两类:
- 纯文字模型:只能处理文字的输入和输出。大部分的模型均是纯文字模型,例如DeepSeek-R1
- 多模态模型:可以处理多种类型的输入和输出,例如图片,语音等。典型的多模态模型有gpt-4o
由于多模态模型训练对数据集和算法的要求非常高,所以现阶段大部分的模型都是纯文字模型。
现在在302.AI,所有大模型后缀加上【-ocr】,即可将纯文字模型”变为“多模态模型了
例如:gpt-3.5-turbo -> gpt-3.5-turbo-ocr
示例:
众所周知,gpt-3.5-turbo是一个纯文字模型,但是图中加了-ocr后缀后,就可以识别图片了。
其实背后的原理也很简单,如图例所示:
简单地说,就是当纯文字模型接收到图片时,会借助另一个多模态模型,将图片解析为文字,再合并上下文一起进行输出。
综合速度和成本的考虑,默认的多模态模型为gpt-4o-mini。
此模型也可以在API中自己定义,修改ocr_model参数即可,如图:
具体的API教程可查看:https://doc.302.ai/api-260114404
给大模型插上网线
大模型的训练过程是对大量的数据进行学习和训练,对数据格式的要求很高,计算能源的消耗也很高,所以无法做到训练数据及时的更新。现在大部分大模型的数据还停留在2023年底,换句话说,大模型对2024年发生了什么一无所知。形象地说,就像一个被关进监狱一年的人,对世界的认知还停留在一年前。
但是日常在应用AI的时候,如果无法了解最新的信息,很多任务是会出现问题的。
现在在302.AI,所有大模型后缀加上【-web-search】,模型将会先联网搜索再进行回答。
例如:gpt-4o-> gpt-4o-web-search
下面举一个例子,我们问gpt-4o,2025年美国总统是谁:
(可以看到,大模型的知识还停留在2023年)
此时我们加上-web-search后缀:
(回答正确)
背后的原理,如图所示:
简单地说,就是当模型接收到用户输入时,会先进行搜索,再将结果合并上下文一起进行输出。此时模型就有了最新的信息。
现阶段每次输入都会进行搜索,未来我们会不断的改进逻辑,希望可以做到只在必要的时候进行搜索。
具体的API教程可查看:https://doc.302.ai/api-260112819
给大模型增加记忆
众所周知,大模型是没有记忆的。从专业角度来解释,所有的大模型API都是无状态API(每个请求是自足的,不依赖于以前的请求或者状态,这样的API可以更容易地进行扩展)。
302.AI和Memobase进行了合作,为所有大模型增加了长期记忆功能,增加一个userid参数即可:
背后的原理大致如下:
具体的教程可以查看这篇文章(https://mp.weixin.qq.com/s/EvqWU-LuqJsMpjLV9SH39w?token=1847659872&lang=zh_CN),这里不再复述。
在第三方应用的使用
考虑到用户除了会直接使用我们的聊天机器人外,还会通过ChatBox、Cherry Studio、Lobechat等第三方应用接入我们的API,我们将功能开关集成到模型名称中,以实现更灵活的功能配置。
下面将以Cherry Studio作为例子:
可以见到在配置中,我们加入了一个gpt-3.5-turbo-ocr的模型。注意需要打开图像类别:
此时,就可以使用这个模型进行图片问答了:
我们再加入一个联网的gpt-4o试试:
检验一下:
关于记忆功能,由于需要更改请求参数,现有的第三方平台暂不支持,还期待各位开发者尽快兼容啦。
总结
回到开头的三个问题:
- 大部分大模型都是瞎子
- 所有大模型都是离线的
- 所有大模型都是没有记忆的
现在在302.AI平台,我们给出了三个最便捷的解决方案:
- 模型名称增加-ocr后缀,就给模型装上了眼睛,例如gpt-3.5-turbo改为gpt-3.5-turbo-ocr
- 模型名称增加-web-search后缀,就给模型插上了网线,例如gpt-4o改为gpt-4o-web-search
- 模型请求增加userid字段,就给模型增加了记忆
三个解决方案全部都是即插即用的API升级,无需额外开发成本,兼容大部分开源项目和第三方应用。
还有些黑科技正在紧锣密鼓开发中,很快就能和大家见面啦:
- 给所有模型增加文件解析功能
- 给所有模型增加function call功能
- 给所有模型增加深度思考功能
敬请期待!
免费试用302.AI,开启你的AI之旅!👈
为什么选择302.AI?
● 灵活付费:无需月费,按需付费,成本可控
● 丰富功能:从文字、图片到视频,应有尽有,满足多种场景需求
● 开源生态:支持开发者深度定制,打造专属AI应用
● 易用性:界面友好,操作简单,快速上手

Comments(20)
[…] (1)超便捷!教你如何1秒为所有大模型API增加图片分析/联网搜索/长期记忆功能 […]
Great blog! Is your theme custom made or did you download it from somewhere? A theme like yours with a few simple tweeks would really make my blog shine. Please let me know where you got your design. Appreciate it
Exactly what I was searching for, thanks for putting up.
obviously like your website but you have to take a look at the spelling on quite a few of your posts. A number of them are rife with spelling problems and I in finding it very troublesome to tell the truth then again I’ll definitely come again again.
[…] 302.AI 实战教程 | 教你如何1秒为所有大模型API增加图片分析/联网搜索/长期记… 302.AI 实战教程 | 《哪吒2》火爆出圈!如何用3D建模工具快速复刻出哪吒? 302.AI 新品发布 | 如何1秒钟为大模型API增加长期记忆?限时免费体验! All Rights Reserved by 302.AI AICGAI应用AI生图AI视频Deepseek Like (0) 302.AI 0 Generate poster 302.AI 新品发布丨语音竞技场:AI语音模型“神仙打架”!200+音色任选,测评+生成全搞定 Previous 2天前 302.AI 新品发布 | 视频太长不想看怎么办?来试一试AI音视频总结工具 Next 2024 年 8 月 7 日 下午6:47 […]
Valuable info. Lucky me I found your web site by accident, and I’m shocked why this accident did not happened earlier! I bookmarked it.
Great write-up, I’m normal visitor of one’s site, maintain up the excellent operate, and It is going to be a regular visitor for a lengthy time.
I’d have to examine with you here. Which is not one thing I usually do! I take pleasure in reading a post that may make folks think. Additionally, thanks for permitting me to comment!
[…] 302.AI 把科普视频做成爆款,小白轻松上手! 302.AI 实战教程 | 教你如何1秒为所有大模型API增加图片分析/联网搜索/长期记… 302.AI 实战教程 | 《哪吒2》火爆出圈!如何用3D建模工具快速复刻出哪吒? […]
Really informative and great bodily structure of subject matter, now that’s user genial (:.
F*ckin’ remarkable things here. I am very glad to see your article. Thanks so much and i’m looking forward to touch you. Will you please drop me a mail?
As a Newbie, I am constantly exploring online for articles that can help me. Thank you
Simply wish to say your article is as astounding. The clearness in your post is simply cool and i could assume you are an expert on this subject. Fine with your permission let me to grab your RSS feed to keep updated with forthcoming post. Thanks a million and please continue the rewarding work.
great publish, very informative. I ponder why the other specialists of this sector don’t understand this. You should proceed your writing. I am confident, you’ve a huge readers’ base already!
I dugg some of you post as I cerebrated they were very useful handy
Everything is very open and very clear explanation of issues. was truly information. Your website is very useful. Thanks for sharing.
I savour, lead to I discovered exactly what I was looking for. You’ve ended my four day lengthy hunt! God Bless you man. Have a nice day. Bye
Thanks, I have just been searching for information about this subject for a while and yours is the best I have found out so far. But, what in regards to the conclusion? Are you positive concerning the source?
Hey! Do you use Twitter? I’d like to follow you if that would be okay. I’m definitely enjoying your blog and look forward to new updates.
There is evidently a bundle to realize about this. I feel you made various good points in features also.