【Unity】AI实战应用——Unity接入ChatGPT和对游戏开发实际应用的展望

news/2024/4/20 12:43:33/文章来源:https://blog.csdn.net/final5788/article/details/129697755

ChatGPT for unity插件地址: GitHub - sunsvip/ChatGPTForUnity: ChatGPT for unity

用法:

  1. 打开Unity PackageManager界面.
  2. Add package from git URL
  3. 粘贴插件地址添加 https://github.com/sunsvip/ChatGPTForUnity.git

————————————————————————————————————

几个资本大佬花钱让一群程序员研发出了AI,砸了程序员的大锅。尤其是ChatGPT 4.0发布后,认识的同事朋友们都在恐慌AI的发展,甚至有不少人开始抗拒。我的观点是:人工智能是大势所趋,势不可挡,那就驾驭它吧!

我司已经在商业项目中实际使用了AI, 包括Stable Diffusion及其扩展插件,当然也有爆火的ChatGPT。

Midjourney + Stable Diffusion + ControlNET + Lora以及Photoshop Stable Diffusion 等插件的结合使用已经强大到基本取代初中级原画师;

ChatGPT 4.0势头已经咄咄逼人,据说下一代会进化到运行时处理功能,比如对磁盘的读写等。用户让ChatGPT“创建一个cs代码”,它就能在电脑硬盘里创建一个代码文件。个人觉得任重道远,功能越强责任越大,如果没有有效解决安全问题之前,这一步很难到来。

ChatGPT已经能全面应用到游戏开发的各个环节了,策划的剧情设定、技术的代码编写优化、测试的测试用例等。我从去年12月开始使用ChatGPT,完全把它当成了一个搜索引擎,自从有了它几乎没使用多少次谷歌百度。4.0的到来彻底激发了我对ChatGPT实际应用的思考。

首先第一步肯定是先把ChatGPT接入Unity,先建立起通讯,以此为基础各种应用功能才能百花齐放。

工具效果预览:

 ChatGPT接口实现:

用UnityWebRequest实现一个与ChatGPT通讯的类,之后的各种功能基于此类。

一,获取API Key

ChatGPT提供了开放接口,仅需一个个人版的API Key就可以接入ChatGPT, API Key获取入口:https://platform.openai.com/account/api-keys

 二,使用UnityWebRequest发送Post请求和接收ChatGPT返回信息

ChatGPT URL:  https://api.openai.com/v1/chat/completions

上行数据结构如下:

{"messages": [{"role": "user","content": "你是机器人吗"//要发送的问题}],"model": "gpt-3.5-turbo",//AI数据模型"temperature": 0.7 //默认是1, 数值越大结果随机性越高
}

下行数据结构如下:

{"id": "chatcmpl-xxxxxxxxxxxxxxxxxx","object": "chat.completion","created": 1678987654,"model": "gpt-3.5-turbo-0301","usage": {"prompt_tokens": 14,"completion_tokens": 23,"total_tokens": 37},"choices": [{"message": {"role": "assistant","content": "\n\n是的,我是一个AI语言模型,也可以被称为机器人。" //得到的回复},"finish_reason": "stop","index": 0}]
}

使用UnityWebRequest发送Post请求:

private IEnumerator Request(string input, Action<bool, string> onComplete, Action<float> onProgressUpdate){var msg = new Message(){role = UserId,content = input,};requestData.AppendChat(msg);messageHistory.Add(msg);using (webRequest = new UnityWebRequest(ChatgptUrl, "POST")){var jsonDt = UtilityBuiltin.Json.ToJson(requestData);Debug.Log(jsonDt);byte[] bodyRaw = Encoding.UTF8.GetBytes(jsonDt);webRequest.uploadHandler = new UploadHandlerRaw(bodyRaw);webRequest.downloadHandler = new DownloadHandlerBuffer();webRequest.SetRequestHeader("Content-Type", "application/json");webRequest.SetRequestHeader("Authorization", $"Bearer {this.ApiKey}");//webRequest.certificateHandler = new ChatGPTWebRequestCert();var req = webRequest.SendWebRequest();while (!webRequest.isDone){onProgressUpdate?.Invoke((webRequest.downloadProgress + webRequest.uploadProgress) / 2f);yield return null;}if (webRequest.result != UnityWebRequest.Result.Success){Debug.LogError($"---------ChatGPT请求失败:{webRequest.error}---------");onComplete?.Invoke(false, string.Empty);}else{var json = webRequest.downloadHandler.text;Debug.Log(json);try{ChatCompletion result = UtilityBuiltin.Json.ToObject<ChatCompletion>(json);int lastChoiceIdx = result.choices.Count - 1;var replyMsg = result.choices[lastChoiceIdx].message;replyMsg.content = replyMsg.content.Trim();messageHistory.Add(replyMsg);onComplete?.Invoke(true, replyMsg.content);}catch (System.Exception e){Debug.LogError($"---------ChatGPT返回数据解析失败:{e.Message}---------");onComplete?.Invoke(false, e.Message);}}webRequest.Dispose();webRequest = null;}}

 以上就是向ChatGPT发送请求并接受回复的核心代码,非常简单。然而不出意外的话会出现请求报错:Cert verify failed: UNITYTLS_X509VERIFY_FLAG_CN_MISMATCH, https证书验证失败。

所以还需要自定义验证类,直接跳过验证返回true:

class ChatGPTWebRequestCert : UnityEngine.Networking.CertificateHandler{protected override bool ValidateCertificate(byte[] certificateData){//return base.ValidateCertificate(certificateData);return true;}}

然后为UnityWebRequest势力指定验证Handler:

webRequest.certificateHandler = new ChatGPTWebRequestCert();

再次运行就能正常接收数据了。

完整代码:

using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Unity.EditorCoroutines.Editor;
using UnityEditor;
using UnityEngine;
using UnityEngine.Networking;namespace UnityGameFramework.Editor.AIAssistant
{public class ChatGPT{const string ChatgptUrl = "https://api.openai.com/v1/chat/completions";const string DefaultAPIKey = "替换自己的ChatGPT API Key";const string DefaultModel = "gpt-3.5-turbo";const float DefaultTemperature = 0;const string DefaultUserId = "user";string ApiKey;string UserId;List<Message> messageHistory;public List<Message> MessageHistory => messageHistory;ChatGPTRequestData requestData;UnityWebRequest webRequest;public float ChatGPTRandomness { get => requestData.temperature; set { requestData.temperature = Mathf.Clamp(value, 0, 2); } }public bool IsRequesting => webRequest != null && !webRequest.isDone;public float RequestProgress => IsRequesting ? (webRequest.uploadProgress + webRequest.downloadProgress) / 2f : 0f;public ChatGPT(string apiKey = DefaultAPIKey, string userId = DefaultUserId, string model = DefaultModel, float temperature = DefaultTemperature){this.ApiKey = apiKey;this.UserId = string.IsNullOrWhiteSpace(userId) ? DefaultUserId : userId;messageHistory = new List<Message>();requestData = new ChatGPTRequestData(model, temperature);}/// <summary>/// 接着上次的话题/// </summary>public void RestoreChatHistory(){var chatHistoryJson = EditorPrefs.GetString("ChatGPT.Settings.ChatHistory", string.Empty);var requestDataJson = EditorPrefs.GetString("ChatGPT.Settings.RequestData", string.Empty);if (!string.IsNullOrEmpty(chatHistoryJson)){var jsonObj = UtilityBuiltin.Json.ToObject<ChatGPTRequestData>(requestDataJson);if (jsonObj != null){requestData.messages = jsonObj.messages;}}if (!string.IsNullOrEmpty(requestDataJson)){var jsonObj = UtilityBuiltin.Json.ToObject<List<Message>>(chatHistoryJson);if (jsonObj != null){messageHistory = jsonObj;}}}public void SaveChatHistory(){var chatHistoryJson = UtilityBuiltin.Json.ToJson(messageHistory);var requestDataJson = UtilityBuiltin.Json.ToJson(requestData);EditorPrefs.SetString("ChatGPT.Settings.ChatHistory", chatHistoryJson);EditorPrefs.SetString("ChatGPT.Settings.RequestData", requestDataJson);}public void Send(string message, Action<bool, string> onComplete = null, Action<float> onProgressUpdate = null){EditorCoroutineUtility.StartCoroutine(Request(message, onComplete, onProgressUpdate), this);}public async Task<string> SendAsync(string message){bool isCompleted = false;string result = string.Empty;Action<bool, string> onComplete = (success, str) =>{isCompleted = true;if (success) result = str;};EditorCoroutineUtility.StartCoroutine(Request(message, onComplete, null), this);while (!isCompleted){await Task.Delay(10);}return result;}private IEnumerator Request(string input, Action<bool, string> onComplete, Action<float> onProgressUpdate){var msg = new Message(){role = UserId,content = input,};requestData.AppendChat(msg);messageHistory.Add(msg);using (webRequest = new UnityWebRequest(ChatgptUrl, "POST")){var jsonDt = UtilityBuiltin.Json.ToJson(requestData);Debug.Log(jsonDt);byte[] bodyRaw = Encoding.UTF8.GetBytes(jsonDt);webRequest.uploadHandler = new UploadHandlerRaw(bodyRaw);webRequest.downloadHandler = new DownloadHandlerBuffer();webRequest.SetRequestHeader("Content-Type", "application/json");webRequest.SetRequestHeader("Authorization", $"Bearer {this.ApiKey}");webRequest.certificateHandler = new ChatGPTWebRequestCert();var req = webRequest.SendWebRequest();while (!webRequest.isDone){onProgressUpdate?.Invoke((webRequest.downloadProgress + webRequest.uploadProgress) / 2f);yield return null;}if (webRequest.result != UnityWebRequest.Result.Success){Debug.LogError($"---------ChatGPT请求失败:{webRequest.error}---------");onComplete?.Invoke(false, string.Empty);}else{var json = webRequest.downloadHandler.text;Debug.Log(json);try{ChatCompletion result = UtilityBuiltin.Json.ToObject<ChatCompletion>(json);int lastChoiceIdx = result.choices.Count - 1;var replyMsg = result.choices[lastChoiceIdx].message;replyMsg.content = replyMsg.content.Trim();messageHistory.Add(replyMsg);onComplete?.Invoke(true, replyMsg.content);}catch (System.Exception e){Debug.LogError($"---------ChatGPT返回数据解析失败:{e.Message}---------");onComplete?.Invoke(false, e.Message);}}webRequest.Dispose();webRequest = null;}}public void NewChat(){requestData.ClearChat();messageHistory.Clear();}public bool IsSelfMessage(Message msg){return this.UserId.CompareTo(msg.role) == 0;}}class ChatGPTRequestData{public List<Message> messages;public string model;public float temperature;public ChatGPTRequestData(string model, float temper){this.model = model;this.temperature = temper;this.messages = new List<Message>();}/// <summary>/// 同一话题追加会话内容/// </summary>/// <param name="chatMsg"></param>/// <returns></returns>public ChatGPTRequestData AppendChat(Message msg){this.messages.Add(msg);return this;}/// <summary>/// 清除聊天历史(结束一个话题), 相当于新建一个聊天话题/// </summary>public void ClearChat(){this.messages.Clear();}}class ChatGPTWebRequestCert : UnityEngine.Networking.CertificateHandler{protected override bool ValidateCertificate(byte[] certificateData){//return base.ValidateCertificate(certificateData);return true;}}class Usage{public int prompt_tokens;public int completion_tokens;public int total_tokens;}public class Message{public string role;public string content;}class Choice{public Message message;public string finish_reason;public int index;}class ChatCompletion{public string id;public string @object;public int created;public string model;public Usage usage;public List<Choice> choices;}
}

使用方法一, 同步获取结果:

var ai = new ChatGPT();
var str = await ai.SendAsync("你好");
Debug.Log(str);

 使用方法二, 异步获取结果:

new ChatGPT().Send("你好", (success, message) => { if (success) Debug.Log(message); }, requestProgress => { Debug.Log($"Request progress:{requestProgress}"); });

三,基于上面的ChatGPT类实现一个ChatGPT聊天窗口

为什么要写个聊天窗口:

1. https://chat.openai.com/chat 网页版登陆锁IP,禁止大陆IP登录,并且会验证时区,如果用美国的节点时区时间对不上拒绝登录,所以每次只能用台湾省的节点登录。

2. 虽然登录成功后不科学也能用,但是同一话题很快就会超时无法应答,刷新界面或新建话题才能正常使用,总之非常鸡肋。

而通过开放接口就没有这些问题,API请求会更加爽快。

聊天窗口功能设计:

1. 需要一个滚动列表展示双方对话记录,对话文本内容支持选择复制。

2. 问题输入框和发送按钮、新建话题(清除话题对话)

3. 对话历史存档。

代码实现,比较简单就不解释了,直接上源码:

using System;
using UnityEditor;
using UnityEngine;namespace UnityGameFramework.Editor.AIAssistant
{[EditorToolMenu("AI助手/ChatGPT", 5)]public class ChatGPTWindow : EditorToolBase{public override string ToolName => "ChatGPT";Vector2 scrollPos = Vector2.zero;ChatGPT ai;private bool settingFoldout = false;string message;const string aiRoleName = "AI";private float chatBoxWidthRatio = 0.85f;private float iconSizeRatio = 0.6f;private float chatBoxPadding = 20;private float chatBoxEdgePadding = 10;GUIStyle myChatStyle;GUIStyle aiChatStyle;GUIStyle aiIconStyle;GUIStyle myIconStyle;GUIStyle txtAreaStyle;GUIContent chatContent;bool isEditorInitialized = false;private float scrollViewHeight;private void OnEnable(){EditorApplication.update += OnEditorUpdate;ai = new ChatGPT(AppBuildSettings.Instance.ChatGPTKey);ai.ChatGPTRandomness = AppBuildSettings.Instance.ChatGPTRandomness;chatContent = new GUIContent();ai.RestoreChatHistory();}private void OnEditorUpdate(){if (EditorApplication.isCompiling || EditorApplication.isUpdating){return;}try{InitGUIStyles();isEditorInitialized = true;EditorApplication.update -= OnEditorUpdate;}catch (Exception){}}private void InitGUIStyles(){aiChatStyle = new GUIStyle(EditorStyles.selectionRect);aiChatStyle.wordWrap = true;aiChatStyle.normal.textColor = Color.white;aiChatStyle.fontSize = 18;aiChatStyle.alignment = TextAnchor.MiddleLeft;myChatStyle = new GUIStyle(EditorStyles.helpBox);myChatStyle.wordWrap = true;myChatStyle.normal.textColor = Color.white;myChatStyle.fontSize = 18;myChatStyle.alignment = TextAnchor.MiddleLeft;txtAreaStyle = new GUIStyle(EditorStyles.textArea);txtAreaStyle.fontSize = 18;aiIconStyle = new GUIStyle();aiIconStyle.wordWrap = true;aiIconStyle.alignment = TextAnchor.MiddleCenter;aiIconStyle.fontSize = 18;aiIconStyle.fontStyle = FontStyle.Bold;aiIconStyle.normal.textColor = Color.black;aiIconStyle.normal.background = EditorGUIUtility.FindTexture("sv_icon_dot5_pix16_gizmo");myIconStyle = new GUIStyle(aiIconStyle);myIconStyle.normal.background = EditorGUIUtility.FindTexture("sv_icon_dot2_pix16_gizmo");}private void OnDisable(){ai.SaveChatHistory();}private void OnGUI(){if (!isEditorInitialized) return;EditorGUILayout.BeginVertical();{scrollPos = EditorGUILayout.BeginScrollView(scrollPos);{scrollViewHeight = 0;foreach (var msg in ai.MessageHistory){var msgRect = EditorGUILayout.BeginVertical();{EditorGUILayout.BeginHorizontal();{bool isMyMsg = ai.IsSelfMessage(msg);var labelStyle = isMyMsg ? myChatStyle : aiChatStyle;chatContent.text = msg.content;float chatBoxWidth = this.position.width * chatBoxWidthRatio;float iconSize = (this.position.width - chatBoxWidth) * iconSizeRatio;float chatBoxHeight = Mathf.Max(iconSize, chatBoxEdgePadding + labelStyle.CalcHeight(chatContent, chatBoxWidth - chatBoxEdgePadding));if (isMyMsg) { GUILayout.FlexibleSpace(); }else{EditorGUILayout.LabelField(aiRoleName, aiIconStyle, GUILayout.Width(iconSize), GUILayout.Height(iconSize));}EditorGUILayout.SelectableLabel(msg.content, labelStyle, GUILayout.Width(chatBoxWidth), GUILayout.Height(chatBoxHeight));if (!isMyMsg) { GUILayout.FlexibleSpace(); }else{EditorGUILayout.LabelField(msg.role, myIconStyle, GUILayout.Width(iconSize), GUILayout.Height(iconSize));}EditorGUILayout.EndHorizontal();}EditorGUILayout.EndVertical();}EditorGUILayout.Space(chatBoxPadding);scrollViewHeight += msgRect.height;}EditorGUILayout.EndScrollView();}if (ai.IsRequesting){var barWidth = position.width * 0.8f;var pBarRect = new Rect((position.width - barWidth) * 0.5f, (position.height - 30f) * 0.5f, barWidth, 30f);EditorGUI.ProgressBar(pBarRect, ai.RequestProgress, $"请求进度:{ai.RequestProgress:P2}");}GUILayout.FlexibleSpace();if (settingFoldout = EditorGUILayout.Foldout(settingFoldout, "展开设置项:")){EditorGUILayout.BeginVertical("box");{EditorGUILayout.BeginHorizontal();{EditorGUILayout.LabelField("ChatGPT API Key:", GUILayout.Width(170));AppBuildSettings.Instance.ChatGPTKey = EditorGUILayout.TextField(AppBuildSettings.Instance.ChatGPTKey);EditorGUILayout.EndHorizontal();}EditorGUILayout.BeginHorizontal();{EditorGUILayout.LabelField("结果随机性:", GUILayout.Width(170));ai.ChatGPTRandomness = AppBuildSettings.Instance.ChatGPTRandomness = EditorGUILayout.Slider(AppBuildSettings.Instance.ChatGPTRandomness, 0, 2);EditorGUILayout.EndHorizontal();}EditorGUILayout.EndVertical();}}//EditorGUILayout.LabelField(scrollPos.ToString());EditorGUILayout.BeginHorizontal();{message = EditorGUILayout.TextArea(message, txtAreaStyle, GUILayout.MinHeight(80));EditorGUI.BeginDisabledGroup(ai.IsRequesting);{if (GUILayout.Button("发送消息", GUILayout.MaxWidth(120), GUILayout.Height(80))){if (!string.IsNullOrWhiteSpace(message)){ai.Send(message, OnChatGPTMessage);}}if (GUILayout.Button("新话题", GUILayout.MaxWidth(80), GUILayout.Height(80))){ai.NewChat();}EditorGUI.EndDisabledGroup();}EditorGUILayout.EndHorizontal();}EditorGUILayout.EndVertical();}}private void OnChatGPTMessage(bool arg1, string arg2){scrollPos.y = scrollViewHeight;if (arg1){message = string.Empty;}Repaint();}}
}

添加代码后,Toolbar的Tools工具栏会自动识别这个工具菜单,点击即可打开ChatGPT对话窗口:

 ChatGPT应用展望:

下一步就是为ChatGPT赋予双手,添加各种指令Handler。比如生成json文件、生成语言国际化Excel文件、修改优化代码、生成代码文件、生成Shader、一键拼UI等等。

分为三个模块:

1. 描述文本(发送给ChatGPT)

2. 动态追加描述内容:有时需要追加一些文本数据,比如让ChatGPT优化一段代码,需要动态追加把代码补充到描述文本。

3. 结果解析。得到目标结果,使用Handler解析ChatGPT返回结果,达成某种功能。ChatGPT返回的代码或json等数据都会用标签包住,通过解析标签就可以生成各种类型的文件。

最终就可以不用写程序,只写问题的描述文本,确保能从ChatGPT得到满意答案就可以实现某项功能。想要新增新的工具,扩展新的功能只需要在文件中添加修改问题描述文本即可。

比如语言国际化,我通过问题描述让ChatGPT从工程代码中扫描所有语言本地化函数GF.Localization.GetText()传入的国际化文本,并且把文本翻译成中文,把结果以key,value键值对保存输出json文件。最后我得到了ChatGPT返回的诸如{"Hello":”你好“}的所有国际化文本和翻译结果。

然后我只需要解析ChatGPT返回结果,生成语言国际化文件到工程中就完成了AI自动处理语言国际化的问题。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.luyixian.cn/news_show_300.aspx

如若内容造成侵权/违法违规/事实不符,请联系dt猫网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

国内ChatGPT——阿里GPT如何和获取

如何获得阿里云大模型邀请码&#xff1f;阿里云的 AI 也开始进入企业测试了。您可以使用申请体验来测试此功能。如果没有邀请码&#xff0c;可以获得资格。如果有邀请码&#xff0c;可以直接获得资格并尝试使用。下面将介绍如何获得阿里云大模型的邀请码。 阿里云大模型邀请码…

#中国版chatGPT来了# 2023年开年,

ChatGPT及AIGC概念在全球爆火&#xff0c;引得一系列相关企业股价大幅上涨&#xff0c;市场落在百度、360等搜索引擎身上的目光明显增多ChatGPT是OpenAI开发的人工智能聊天机器人程序&#xff0c;于2022年11月推出。该程序使用基于GPT-3.5架构的大型语言模型并以强化学习训练。…

GPT-3.5(ChatGPT)训练和部署成本估算

因为ChatGPT&#xff08;GPT-3.5&#xff09;未正式公布参数量&#xff0c;暂时按照1750亿参数计算。 后续其他模型公布参数量后&#xff0c;可按参数量线性比例估算相关数值。 以下数值仅为理论估算&#xff0c;可能和实际数值相差很大&#xff0c;敬请谅解。 一、GPT-3.5磁…

ChatGPT是风口吗?爆火后的质疑猝不及防

作者观&#xff1a;首先要明确一点&#xff0c;ChatGPT代替不了人类&#xff0c;不要抱不切实际的期望。作为一款由OpenAI开发的人工智能聊天软件&#xff0c;该程序在一些人的眼里具有革命性的意义。有人说&#xff0c;这玩意儿可以在一夜之间让无数人失业&#xff0c;也有人将…

为什么要学习Python呢?有了 ChatGPT 还有必要学习 python 吗?

为什么学习Python呢&#xff1f; 学习 Python 的原因有很多&#xff0c;以下是一些常见的原因&#xff1a; 简单易学&#xff1a; Python 是一门易于学习的编程语言&#xff0c;语法简单、清晰明了&#xff0c;可以快速掌握基本的编程概念。应用广泛&#xff1a; Python 是一…

解锁ChatGPT超高级玩法,展示动态图片,纯干货分享!

文 / 韩彬&#xff08;微信公众号&#xff1a;量子论&#xff09;这段时间在玩ChatGPT&#xff0c;总是文字&#xff0c;我有点玩腻了&#xff0c;突然想让ChatGPT返回一张图片&#xff0c;可是它却答复&#xff1a;很抱歉&#xff0c;作为一个语言模型&#xff0c;我无法展示图…

ChatGPT: History is temporarily unavailable. We‘re working to restore this feature as soon as possib

ChatGPT聊天记录不可用&#xff1f;界面左侧栏History is temporarily unavailable. Were working to restore this feature as soon as possible.试试这个由于最近有ChatGPT用户爆出自己的历史聊天记录显示不是自己的&#xff0c;这很可能是一次数据泄露的BUG&#xff0c;目前…

科大讯飞刘聪:由ChatGPT浪潮引发的深入思考与落地展望

近期&#xff0c;以“生成式人工智能”&#xff08;Generative AI&#xff09;为核心技术的聊天机器人ChatGPT火爆全球。百度、阿里巴巴、科大讯飞、360等国内企业纷纷抛出ChatGPT相关进展&#xff0c;打造中国版的ChatGPT。 科大讯飞此前在投资者互动平台表示&#xff0c;Cha…

什么是ChatGPT ?以及它的工作原理介绍

ChatGPT 是 OpenAI 的最新语言模型&#xff0c;比其前身 GPT-3 有了重大改进。与许多大型语言模型类似&#xff0c;ChatGPT 能够为不同目的生成多种样式的文本&#xff0c;但具有更高的精确度、细节和连贯性。它代表了 OpenAI 大型语言模型系列的下一代产品&#xff0c;其设计非…

GPT-4震撼发布:多模态大模型,直接升级ChatGPT、必应,开放API,游戏终结的时代到来了?

ChatGPT 点燃了科技行业的明灯&#xff0c;GPT-4 能燎原吗&#xff1f; 谁能革得了 ChatGPT 的命&#xff1f;现在看来还是 OpenAI 自己。 人们一直在探讨AI下一步的发展方向是什么&#xff0c;特别是在ChatGPT引爆科技领域之后。许多学者认为&#xff0c;多模态技术将成为未…

我对ChatGPT的一些看法与思考

我对ChatGPT的一些看法与思考 文章目录我对ChatGPT的一些看法与思考1.什么是ChatGPT1.1 ChatGPT是干啥的1.2 ChatGPT的发布时间1.3 ChatGPT的图标2.ChatGPT的同类程序以及ChatGPT的优越性2.1 ChatGPT的同类程序2.2 ChatGPT相较于其他的优越性2.3ChatGPT已经开源的部分代码3.我对…

一块GPU搞定ChatGPT;ML系统入坑指南;理解GPU底层架构

1. 跑ChatGPT体量模型&#xff0c;从此只需一块GPU 在发展技术&#xff0c;让大模型掌握更多能力的同时&#xff0c;也有人在尝试降低AI所需的算力资源。最近&#xff0c;一种名为FlexGen的技术因为「一块RTX 3090跑ChatGPT体量模型」而获得了人们的关注。 虽然FlexGen加速后的…

大战谷歌!微软Bing引入ChatGPT;羊了个羊高·薪招纳技术人才;Debian彻底移除Python2;GitHub今日热榜 | ShowMeAI资讯日报

&#x1f440;日报合辑 | &#x1f3a1;AI应用与工具大全 | &#x1f514;公众号资料下载 | &#x1f369;韩信子 &#x1f3a1; 『微软Bing』将引入 ChatGPT&#xff0c;与 Google 一场大战难免 微软计划2023年3月底之前推出 Bing 搜索引擎的新版本&#xff0c;使用 ChatGPT …

ChatGPT目前存在四大严重设计问题, 全面使用前需要注意OpenAI正在努力解决

随着 Make-A-Video、ChatGPT、PaLM 和其他大型语言模型获得如此多的关注,重要的是要记住这些模型存在严重的设计问题。 ChatGPT 最近很火。人们一直在使用它来完成各种任务——从撰写销售电子邮件和完成大学作业,甚至作为 Google 搜索的可能替代品。将其与其他大型语言模型(…

ChatGPT技术

目录一、什么是ChatGPT&#xff1f;二、ChatGPT的技术背景三、ChatGPT的主要特点四、ChatGPT的工作原理五、ChatGPT为何成功&#xff1f;一、什么是ChatGPT&#xff1f; ChatGPT本质是一个对话模型&#xff0c;它可以回答日常问题、进行多轮闲聊&#xff0c;也可以承认错误回复…

【我用ChatGPT学编程】Vue-Router中history模式Nginx部署后刷新404的问题

前言 作为一个码农我们都知道ChatGPT实际上是一个十分好用的代码工具&#xff0c;它使用了MarkDown语法更符合我们的习惯&#xff0c;并且可以根据语义理解问题并且给出多种解决方案&#xff0c;所以这个系列就是用ChatGPT来给出对于在coding时遇到的各种Bug。 ChatGPT似乎可…

不仅仅是ChatGPT:分享一些AI时代的有力工具

本文已发表在哔哔哔哔-不仅仅是ChatGPT&#xff1a;分享一些AI时代的有力工具 前言 可以说AI技术在2022年底是一个技术奇点&#xff0c;完成突破之后&#xff0c;我们可以预见一个技术爆炸的时代。 在计算机的早期&#xff0c;人与计算机的交互只有键盘&#xff0c;是鼠标和G…

上知天文,下知地理,还能替人写脚本!人工智能的进阶ChatGPT

ChatGPT是OpenAI在11月30日推出的聊天机器人&#xff0c;于12月1日起对公众免费开放。 自从这东西出来之后&#xff0c;大家对此的讨论热情越发浓烈。ChatGPT具体可以干些什么&#xff1f; 帮你写论文、检讨书、情书&#xff0c;甚至情诗也能信手拈来。 以上都是网友测试它写…

文心一言发布!【中国版ChatGPT】附测试链接

文心一言是百度推出的生成式对话产品&#xff0c;2023.3.16正式发布12。它基于文心大型模型技术&#xff0c;被外界誉为“中国版ChatGPT” 文心一言测试链接&#xff1a; https://cloud.baidu.com/survey_summit/wenxin.html 文心一言与Chatgpt对比 文心一言在中文的支持方面…

New bing带着chatGPT来啦

话不多说&#xff0c;随着chatGPT的到来&#xff0c;GPT-4的升级&#xff0c;AI时代真的要来啦。现在微软浏览器 bing 已经接入最新的GPT版本&#xff0c;而且是免费&#xff0c;重要的事情说三遍&#xff0c;免费使用GPT&#xff0c;免费使用GPT&#xff0c;免费使用GPT&#…