chatgpt-4生成代码,看这一篇就够了

article/2024/9/17 3:32:31

chatgpt-4生成代码,看这一篇就够了

  • cursor
  • 示例
    • python
      • dbscan 聚类
      • voronoi 图像分割
      • 手写数字识别
      • 圆柱绕流
    • matlab
      • 表白程序
      • 常微分方程
      • 常微分方程组
      • 2048小游戏
    • C/C++
      • 正则表达式匹配
      • 删除有序数组中的重复项
      • n 皇后问题
  • 总结

今天发现一个OpenAI的partnership基于gpt-4开发的好玩的code generation软件,分享一下

cursor

官网 https://www.cursor.so/
Build Software. Fast.
Write, edit, and chat about your code with GPT-4
在这里插入图片描述
直接下载安装就可以,使用起来也非常简单,ctrl+k 就可以输入命令生成代码。

示例

先看简介,可以生成,编辑,修改代码

// 1. Try generating with command K on a new line. Ask for a new react component of an error popup.
// 2. Then, select the outputted code and hit chat. Ask if there's a bug. Ask how to improve.
// 3. Try selecting some code and hitting edit. Ask the bot to add a button that updates a statefield.
// 4. To try out cursor on your own projects, go to file menu (top left) and open a folder.

python

dbscan 聚类

prompt: Help me write a dbscan program
在这里插入图片描述

# First, import necessary libraries
from sklearn.cluster import DBSCAN
from sklearn.datasets import make_blobs
from sklearn.preprocessing import StandardScaler
# Generate sample data
X, y = make_blobs(n_samples=1000, centers=5, random_state=42)
# Scale the data
X = StandardScaler().fit_transform(X)
# Initialize DBSCAN object
dbscan = DBSCAN(eps=0.5, min_samples=5)
# Fit the data
dbscan.fit(X)
# Print the labels
print(dbscan.labels_)
# As we can see, some points are labeled as -1, which means they are considered as noise by DBSCAN.
# Let's count the number of noise points
n_noise = list(dbscan.labels_).count(-1)
print(f"Number of noise points: {n_noise}")
# Let's visualize the clusters
import matplotlib.pyplot as plt
# Create a scatter plot of the first two features
plt.scatter(X[:,0], X[:,1], c=dbscan.labels_, cmap='rainbow')
plt.title('DBSCAN Clustering')
plt.xlabel('Feature 1')
plt.ylabel('Feature 2')
plt.show()

运行效果
在这里插入图片描述

voronoi 图像分割

prompt: voronoi

import numpy as np
from scipy.spatial import Voronoi, voronoi_plot_2d
import matplotlib.pyplot as plt
# Generate sample data
points = np.random.rand(20, 2)
# Compute Voronoi tesselation
vor = Voronoi(points)
# Plot result
fig = voronoi_plot_2d(vor)
plt.show()

在这里插入图片描述

手写数字识别

Prompt: Write a handwritten digit recognition program

import tensorflow as tf
from tensorflow import keras
import numpy as np
import matplotlib.pyplot as plt# Load the MNIST dataset
mnist = keras.datasets.mnist
(train_images, train_labels), (test_images, test_labels) = mnist.load_data()# Normalize the images
train_images = train_images / 255.0
test_images = test_images / 255.0# Define the model
model = keras.Sequential([keras.layers.Flatten(input_shape=(28, 28)),keras.layers.Dense(128, activation='relu'),keras.layers.Dense(10)
])# Compile the model
model.compile(optimizer='adam',loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True),metrics=['accuracy'])# Train the model
model.fit(train_images, train_labels, epochs=10)# Evaluate the model
test_loss, test_acc = model.evaluate(test_images, test_labels, verbose=2)
print('\nTest accuracy:', test_acc)# Make predictions
probability_model = tf.keras.Sequential([model, tf.keras.layers.Softmax()])
predictions = probability_model.predict(test_images)# Plot the first 25 test images and their predicted labels
plt.figure(figsize=(10,10))
for i in range(25):plt.subplot(5,5,i+1)plt.xticks([])plt.yticks([])plt.grid(False)plt.imshow(test_images[i], cmap=plt.cm.binary)predicted_label = np.argmax(predictions[i])true_label = test_labels[i]if predicted_label == true_label:color = 'white'else:color = 'red'plt.xlabel("{} ({})".format(predicted_label, true_label), color=color)
plt.show()

tf不太熟悉,简单解释下,先下载了mnist数据集,然后定义一个全连接网络,relu激活函数,adam优化器,训练十个epoch,看下结果
在这里插入图片描述
在这里插入图片描述

圆柱绕流

挺像回事的,可惜运行不出来,要我自己写也有难度

# Writing a program for the flow around a cylinder using the finite volume method# Import necessary libraries
import numpy as np
import matplotlib.pyplot as plt# Define grid parameters
nx = 101  # Number of grid points in x-direction
ny = 101  # Number of grid points in y-direction
Lx = 4.0  # Length of domain in x-direction
Ly = 4.0  # Length of domain in y-direction
dx = Lx / (nx - 1)  # Grid spacing in x-direction
dy = Ly / (ny - 1)  # Grid spacing in y-direction
x = np.linspace(0.0, Lx, num=nx)  # Grid points in x-direction
y = np.linspace(0.0, Ly, num=ny)  # Grid points in y-direction
X, Y = np.meshgrid(x, y)  # Meshgrid of x and y points# Define flow parameters
U_inf = 1.0  # Free-stream velocity
nu = 0.1  # Kinematic viscosity
Re = U_inf * Lx / nu  # Reynolds number
dt = 0.001  # Time step
nt = 1000  # Number of time steps# Define initial conditions
u = np.zeros((ny, nx))  # x-velocity
v = np.zeros((ny, nx))  # y-velocity
p = np.zeros((ny, nx))  # Pressure
b = np.zeros((ny, nx))  # Source term# Define functions for pressure Poisson equation
def laplacian(p, dx, dy):"""Computes the Laplacian of a 2D scalar field."""pxx = (np.roll(p, -1, axis=1) - 2.0 * p + np.roll(p, 1, axis=1)) / dx ** 2pyy = (np.roll(p, -1, axis=0) - 2.0 * p + np.roll(p, 1, axis=0)) / dy ** 2return pxx + pyydef poisson_p(p, b, dx, dy):"""Solves the pressure Poisson equation using the Jacobi method."""pn = np.empty_like(p)pn[:] = p[:]for n in range(nt):pn[:] = p[:]p[1:-1, 1:-1] = (((pn[1:-1, 2:] + pn[1:-1, :-2]) * dy ** 2 +(pn[2:, 1:-1] + pn[:-2, 1:-1]) * dx ** 2 -b[1:-1, 1:-1] * dx ** 2 * dy ** 2) /(2.0 * (dx ** 2 + dy ** 2)))p[:, -1] = p[:, -2]  # dp/dx = 0 at x = Lxp[0, :] = p[1, :]  # dp/dy = 0 at y = 0p[-1, :] = 0.0  # p = 0 at y = Ly
# Define source term
def build_up_b(b, rho, dt, u, v, dx, dy):"""Builds the source term for the pressure Poisson equation."""b[1:-1, 1:-1] = (rho * (1.0 / dt *((u[1:-1, 2:] - u[1:-1, 0:-2]) / (2 * dx) +(v[2:, 1:-1] - v[0:-2, 1:-1]) / (2 * dy)) -((u[1:-1, 2:] - u[1:-1, 0:-2]) / (2 * dx)) ** 2 -2 * ((u[2:, 1:-1] - u[0:-2, 1:-1]) / (2 * dy) *(v[1:-1, 2:] - v[1:-1, 0:-2]) / (2 * dx)) -((v[2:, 1:-1] - v[0:-2, 1:-1]) / (2 * dy)) ** 2))return b# Define density
rho = 1.0
# Solve for velocity and pressure fields
for n in range(nt):un = u.copy()vn = v.copy()b = build_up_b(b, rho, dt, u, v, dx, dy)p = poisson_p(p, b, dx, dy)u[1:-1, 1:-1] = (un[1:-1, 1:-1] -un[1:-1, 1:-1] * dt / dx *(un[1:-1, 1:-1] - un[1:-1, 0:-2]) -vn[1:-1, 1:-1] * dt / dy *(un[1:-1, 1:-1] - un[0:-2, 1:-1]) -dt / (2 * rho * dx) * (np.roll(p[1:-1, :], -1, axis=1) - np.roll(p[1:-1, :], 1, axis=1)) +nu * (dt / dx ** 2 *(un[1:-1, 2:] - 2 * un[1:-1, 1:-1] + un[1:-1, 0:-2]) +dt / dy ** 2 *(un[2:, 1:-1] - 2 * un[1:-1, 1:-1] + un[0:-2, 1:-1])))v[1:-1, 1:-1] = (vn[1:-1, 1:-1] -un[1:-1, 1:-1] * dt / dx *(vn[1:-1, 1:-1] - vn[1:-1, 0:-2]) -vn[1:-1, 1:-1] * dt / dy *(vn[1:-1, 1:-1] - vn[0:-2, 1:-1]) -dt / (2 * rho * dy) * (p[2:, 1:-1] - p[0:-2, 1:-1]) +nu * (dt / dx ** 2 *(vn[1:-1, 2:] - 2 * vn[1:-1, 1:-1] + vn[1:-1, 0:-2]) +dt / dy ** 2 *(vn[2:, 1:-1] - 2 * vn[1:-1, 1:-1] + vn[0:-2, 1:-1])))
# Plot velocity magnitude
vel_magnitude = np.sqrt(u ** 2 + v ** 2)
plt.figure(figsize=(6.0, 6.0))
plt.title('Velocity magnitude')
plt.xlabel('x')
plt.ylabel('y')
plt.xlim(0.0, Lx)
plt.ylim(0.0, Ly)
plt.contourf(X, Y, vel_magnitude, levels=np.linspace(0.0, 0.1, num=10))
plt.colorbar()
plt.show()

matlab

表白程序

Prompt : Write a program to show love to a girl

disp('I love you more than words can express.');
disp('You are the most beautiful and amazing person I have ever met.');
disp('I promise to always be there for you, to support you, and to make you laugh.');
disp('I want to spend the rest of my life with you.');
disp('Will you be mine forever?');

常微分方程

Prompt : Write a program for solving ordinary differential equations

% Define the differential equation
dydt = @(t,y) t*y^2;% Define the initial condition
y0 = 1;% Define the time interval
tspan = [0 1];% Solve the differential equation
[t,y] = ode45(dydt,tspan,y0);% Plot the solution
plot(t,y)
xlabel('Time')
ylabel('y')
title('Solution of dy/dt = ty^2')

常微分方程组

Prompt : Write a program for solving multiple ordinary differential equations
这个需要稍微修改一下顺序


% Define the initial conditions
y0 = [1; 1; 1];% Define the time span
tspan = [0 10];% Solve the system of differential equations
[t,y] = ode45(@myODEs, tspan, y0);% Plot the results
plot(t,y(:,1),'-',t,y(:,2),'--',t,y(:,3),':');
legend('y_1','y_2','y_3');
xlabel('Time');
ylabel('Solution');% Define the system of differential equations
function dydt = myODEs(t,y)
dydt = zeros(3,1);
dydt(1) = -0.1*y(1) + 0.2*y(2)*y(3);
dydt(2) = 0.1*y(1) - 0.2*y(2)*y(3) - 0.3*y(2);
dydt(3) = 0.2*y(1) + 0.3*y(2) - 0.4*y(3);end

运行结果:
在这里插入图片描述

2048小游戏

clear all;
close all;
clc;
% 初始化
board = zeros(4,4);
% 随机生成两个数字
board = generateNumber(board);
board = generateNumber(board);
% 游戏开始
while true% 显示当前棋盘disp(board);% 判断游戏是否结束if isGameOver(board)disp('Game Over!');break;end% 获取用户输入direction = input('Please input direction (w/s/a/d): ','s');% 移动棋子board = move(board,direction);% 随机生成一个数字board = generateNumber(board);
endfunction board = generateNumber(board)% 在空白位置随机生成一个数字[i,j] = find(board==0);if ~isempty(i)idx = randi(length(i));if rand < 0.9board(i(idx),j(idx)) = 2;elseboard(i(idx),j(idx)) = 4;endend
endfunction gameOver = isGameOver(board)% 判断是否有空位if any(board(:)==0)gameOver = false;return;end% 判断是否有相邻的相同数字[m,n] = size(board);for i = 1:mfor j = 1:n-1if board(i,j)==board(i,j+1)gameOver = false;return;endendendfor i = 1:m-1for j = 1:nif board(i,j)==board(i+1,j)gameOver = false;return;endendend% 没有空位,也没有相邻的相同数字,游戏结束gameOver = true;
endfunction board = move(board,direction)% 根据方向移动棋子switch directioncase 'w'for j = 1:4% 向上合并for i = 1:3if board(i,j)==0continue;endfor k = i+1:4if board(k,j)==0continue;elseif board(k,j)==board(i,j)board(i,j) = board(i,j)*2;board(k,j) = 0;break;elsebreak;endendend% 向上移动for i = 1:3if board(i,j)==0for k = i+1:4if board(k,j)~=0board(i,j) = board(k,j);board(k,j) = 0;break;endendendendendcase 's'for j = 1:4% 向下合并for i = 4:-1:2if board(i,j)==0continue;endfor k = i-1:-1:1if board(k,j)==0continue;elseif board(k,j)==board(i,j)board(i,j) = board(i,j)*2;board(k,j) = 0;break;elsebreak;endendend% 向下移动for i = 4:-1:2if board(i,j)==0for k = i-1:-1:1if board(k,j)~=0board(i,j) = board(k,j);board(k,j) = 0;break;endendendendendcase 'a'for i = 1:4% 向左合并for j = 1:3if board(i,j)==0continue;endfor k = j+1:4if board(i,k)==0continue;elseif board(i,k)==board(i,j)board(i,j) = board(i,j)*2;board(i,k) = 0;break;elsebreak;endendend% 向左移动for j = 1:3if board(i,j)==0for k = j+1:4if board(i,k)~=0board(i,j) = board(i,k);board(i,k) = 0;continue;endendendendendcase 'd'for i = 1:4% 向右合并for j = 4:-1:2if board(i,j)==0continue;endfor k = j-1:-1:1if board(i,k)==0continue;elseif board(i,k)==board(i,j)board(i,j) = board(i,j)*2;board(i,k) = 0;break;elsebreak;endendend% 向右移动for j = 4:-1:2if board(i,j)==0for k = j-1:-1:1if board(i,k)~=0board(i,j) = board(i,k);board(i,k) = 0;continue;endendendendendend
end

运行效果
在这里插入图片描述

C/C++

来刷会leecode吧,直接上困难强度

正则表达式匹配

给你一个字符串 s 和一个字符规律 p,请你来实现一个支持 '.''*' 的正则表达式匹配。'.' 匹配任意单个字符
'*' 匹配零个或多个前面的那一个元素
所谓匹配,是要涵盖 整个 字符串 s的,而不是部分字符串。示例 1:
输入:s = "aa", p = "a"
输出:false
解释:"a" 无法匹配 "aa" 整个字符串。示例 2:
输入:s = "aa", p = "a*"
输出:true
解释:因为 '*' 代表可以匹配零个或多个前面的那一个元素, 在这里前面的元素就是 'a'。因此,字符串 "aa" 可被视为 'a' 重复了一次。示例 3:
输入:s = "ab", p = ".*"
输出:true
解释:".*" 表示可匹配零个或多个('*')任意字符('.')。来源:力扣(LeetCode)
链接:https://leetcode.cn/problems/regular-expression-matching
著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。

没给头文件,还得我自己加。。。

#include <iostream>
#include <string>
#include <vector>
using namespace std;class Solution {
public:bool isMatch(string s, string p) {int m = s.size(), n = p.size();vector<vector<bool>> dp(m + 1, vector<bool>(n + 1, false));dp[0][0] = true;for (int i = 0; i <= m; i++) {for (int j = 1; j <= n; j++) {if (p[j - 1] == '*') {dp[i][j] = dp[i][j - 2];if (matches(s, p, i, j - 1)) {dp[i][j] = dp[i][j] || dp[i - 1][j];}}else {if (matches(s, p, i, j)) {dp[i][j] = dp[i - 1][j - 1];}}}}return dp[m][n];}bool matches(string& s, string& p, int i, int j) {if (i == 0) {return false;}if (p[j - 1] == '.') {return true;}return s[i - 1] == p[j - 1];}
};
int main() {Solution s;string str = "ab";string pattern = ".*";cout << s.isMatch(str, pattern) << endl;return 0;
}

有兴趣自己拿去测试,写的是对的

删除有序数组中的重复项

太简单了我都会

删除有序数组中的重复项
给你一个 升序排列 的数组 nums ,请你 原地 删除重复出现的元素,使每个元素 只出现一次 ,返回删除后数组的新长度。元素的 相对顺序 应该保持 一致 。由于在某些语言中不能改变数组的长度,所以必须将结果放在数组nums的第一部分。更规范地说,如果在删除重复项之后有 k 个元素,那么 nums 的前 k 个元素应该保存最终结果。将最终结果插入 nums 的前 k 个位置后返回 k 。不要使用额外的空间,你必须在 原地 修改输入数组 并在使用 O(1) 额外空间的条件下完成。来源:力扣(LeetCode)
链接:https://leetcode.cn/problems/remove-duplicates-from-sorted-array
著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
#include <iostream>
#include <string>
#include <vector>
using namespace std;int removeDuplicates(vector<int>& nums) {if (nums.empty()) {return 0;}int i = 0;for (int j = 1; j < nums.size(); j++) {if (nums[j] != nums[i]) {i++;nums[i] = nums[j];}}return i + 1;
}
int main() {vector<int> nums = { 9,9 ,1, 1, 2, 2, 2, 3, 4, 5, 5 };int len = removeDuplicates(nums);for (int i = 0; i < len; i++) {cout << nums[i] << " ";}cout << endl;return 0;
}
// Output: 1 2 3 4 5

n 皇后问题

按照国际象棋的规则,皇后可以攻击与之处在同一行或同一列或同一斜线上的棋子。n 皇后问题 研究的是如何将 n 个皇后放置在 n×n 的棋盘上,并且使皇后彼此之间不能相互攻击。给你一个整数 n ,返回所有不同的 n 皇后问题 的解决方案。每一种解法包含一个不同的 n 皇后问题 的棋子放置方案,该方案中 'Q' 和 '.' 分别代表了皇后和空位。来源:力扣(LeetCode)
链接:https://leetcode.cn/problems/n-queens
著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
#include <iostream>
#include <string>
#include <vector>
using namespace std;class Solution {
public:vector<vector<string>> solveNQueens(int n) {vector<vector<string>> res;vector<string> board(n, string(n, '.'));backtrack(res, board, 0);return res;}void backtrack(vector<vector<string>>& res, vector<string>& board, int row) {if (row == board.size()) {res.push_back(board);return;}for (int col = 0; col < board.size(); col++) {if (!isValid(board, row, col)) continue;board[row][col] = 'Q';backtrack(res, board, row + 1);board[row][col] = '.';}}bool isValid(vector<string>& board, int row, int col) {for (int i = 0; i < row; i++) {if (board[i][col] == 'Q') return false;}for (int i = row - 1, j = col - 1; i >= 0 && j >= 0; i--, j--) {if (board[i][j] == 'Q') return false;}for (int i = row - 1, j = col + 1; i >= 0 && j < board.size(); i--, j++) {if (board[i][j] == 'Q') return false;}return true;}
};
int main() {Solution s;vector<vector<string>> res = s.solveNQueens(5);for (auto& board : res) {for (auto& row : board) {cout << row << endl;}cout << endl;}return 0;
}
/*
output:
...Q.
Q....
..Q..
....Q
.Q......Q.
.Q...
....Q
..Q..
Q........Q
.Q...
...Q.
Q....
..Q......Q
..Q..
Q....
...Q.
.Q...
*/

我怀疑这是个搜索引擎。。。

总结

体验下来能写一些基础的程序,支持 html / css / python / c / rust / go / c# / java / php / matlab等语言,用来写点小工具还是非常不错的,可以说比我水平高多了,gpt4果然有点东西。
估计未来可重复性的程序员的工作会被替代,可以说大大降低了编程的门槛,但同时生成的代码也需要有一定基础的人去修改,对于我们搞cfd的影响还不大,用来做做数据处理挺好。
最后,一定要做一个会提问的人!


http://chatgpt.dhexx.cn/article/ZpfiHJSe.shtml

相关文章

50行不到的代码,实现自己的ChatGPT服务

效果图 废话不多说直接上代码 代码1&#xff1a;后端纯净代码 import openai import time# 定义 OpenAI API key openai.api_key "请在此输入你的key" # 定义模型 ID model_engine "text-davinci-003" # 定义对话历史记录 conversation_history []# …

火遍全球的ChatGPT技术简介与主干网络代码

如果说当下最火的AI技术和话题是什么&#xff0c;恐怕很难绕开ChatGPT。各大厂商都在表示未来要跟进ChatGPT技术&#xff0c;开发在自然语言处理智能系统&#xff0c;可见其影响力。本篇博客追个热度&#xff0c;来简单的介绍下ChatGPT到底是一项什么技术&#xff0c;究竟如何完…

ChatGPT评出中国排名前的30大学及全球排名,原因很好玩

中国排名前50的大学在中国国内及在全世界的排名&#xff0c;还有原因 以下是中国排名前50位的大学及其在全球的排名和原因&#xff1a; 清华大学 (17)&#xff1a;清华大学是中国著名的高水平研究型综合性大学&#xff0c;其在工程学、计算机科学和自然科学等领域具有很高的研究…

【chatGPT演示】

首发网站 天风的人工智能小站 前言&#xff1a;chatGPT 一、注册 https://chat.openai.com/auth/login 1、点击右边注册sign up 2、可以使用自己的邮箱或者谷歌邮箱注册 验证邮箱输入姓名 3、现在到了最关键的一步 因为openAI不对中国开放所以&#xff0c;必须要购买一个外…

聊一聊ChatGPT

最近突然ChatGPT火了&#xff0c;这一款人工智能聊天机器人程序的月活用户已突破1亿&#xff0c;成为史上增长最快的消费者应用。各大IT企业也纷纷宣布拥抱ChatGPT&#xff0c;包括微软、谷歌等。中国国内的百度、科大讯飞也在准备推出国内版的类似ChatGPT的人工智能语音应用。…

chatgpt如何自动生成角色prompt模板

chatgpt如何自动生成角色prompt模板 作者&#xff1a;虚坏叔叔 博客&#xff1a;https://xuhss.com 早餐店不会开到晚上&#xff0c;想吃的人早就来了&#xff01;&#x1f604; 一、角色prompt模板 下面是套图的chatgpt模板&#xff0c;你可以手动的进行填写。将角色的描述填…

报道称,中国互联网巨头将推出自己的 ChatGPT 版本

中国互联网巨头百度计划推出自己的 ChatGPT版本。 周日的一份报告称&#xff0c;该公司将于 3 月推出其人工智能聊天机器人 一位自称了解此事的人士告诉彭博社 。 消息人士称&#xff0c;该工具尚未命名&#xff0c;一开始将并入百度的主要搜索服务。 有关的 ChatGPT&#xff1…

ChatGPT自然语言处理的新里程碑

ChatGPT中文网是一个面向中国用户的聊天机器人网站&#xff0c;旨在为国内用户提供一个自然的环境、有趣、实用的聊天体验。它使用最新的自然语言处理技术来帮助用户更好地理解他们的聊天对话&#xff0c;还可以帮助用户解决日常生活中的问题&#xff0c;提供有趣的谈话内容以及…

ChatGPT:短期被高估

ChatGPT有多热 ChatGPT有多热&#xff0c;我们可以通过百度指数看一下。 伴随着ChatGPT席卷而来&#xff0c;国内诸多业内人士热议&#xff0c;包括求加入。典型的是前美团联合创始人王慧文。在前两天&#xff0c;他就曾在朋友圈中发布“人工智能宣言”&#xff0c;表示以5000万…

【花雕学AI】4月5日,ChatGPT中国财经背景分析:昨天沪指重返3300点,这说明了什么?

在这里插入图片描述 附录&#xff1a; 一、ChatGPT是一个可以和你聊天的人工智能程序&#xff0c;它可以用文字回答你的问题&#xff0c;也可以根据你的提示写出文章、歌词、代码等内容。ChatGPT是由一个叫OpenAI的机构开发的&#xff0c;它使用了一种叫做GPT的技术&…

国产ChatGPT Al大模型排行榜(TOP 30)

关注、星标公众号&#xff0c;精彩内容每日送达 来源&#xff1a;网络素材 1&#xff09; AI不会臣服于人类的工具 2&#xff09;AI具备了思想而不被人类理解 3&#xff09;AI是具备有生命特征的生命 4&#xff09;中国智慧的抽象算法比西方大数据算法维度要高&#xff0c;八卦…

ChatGPT的未来发展

文章目录 1.什么是ChatGPT2.ChatGPT的基础技术3.ChatGPT工作原理4.ChatGPT应用场景5.ChatGPT局限性6.ChatGPT的未来发展 ✍创作者&#xff1a;全栈弄潮儿 &#x1f3e1; 个人主页&#xff1a; 全栈弄潮儿的个人主页 &#x1f3d9;️ 个人社区&#xff0c;欢迎你的加入&#xff…

ChatGPT团队9位华人揭秘:3清华、1北大、1华科

Datawhale分享 分析&#xff1a;ChatGPT团队&#xff0c;来源&#xff1a;AIGC开放社区 Aminer和智谱研究发布了《ChatGPT团队背景研究》报告&#xff0c;深度揭示了这款火爆全球应用的背后团队的总体人员架构。 调查发现&#xff0c;ChatGPT团队只有87人&#xff0c;其显著特…

ChatGPT 从入门到精通

ChatGPT 从入门到精通 适用人群: 互联网一线对ChatGPT感兴趣的划时代先驱者们 内容来源: 内容均出自网络 创建时间: 2023年2月9日 最近更新: 2023年3月29日(每天中午十二点准时更新) 文档内容:分享的内容包括但不限于赚钱引流、实际落地、最新资讯、未来发展、等多个模块。 文…

聊聊中国ChatGPT的应用场景!

01中国版ChatGPT技术原理 首先&#xff0c;ChatGPT是由大量的文本数据进行训练得到的。这些数据包括文章、书籍、新闻报道等&#xff0c;通过对这些数据的学习&#xff0c;ChatGPT可以自动地学会语言的语法、词汇和惯用语等知识。 其次&#xff0c;ChatGPT采用了一种被称为“…

人工智能里程碑ChatGPT之最全详解图解

人工智能里程碑ChatGPT之最全详解图解 1. ChatGPT的前世今生1.1 ChatGPT演化路线1.2技术推进路线 2.ChatGPT主要功能及应用领域2.1 主要功能2.2 应用领域 3.1ChatGPT原理3.1 ChatGPT基石之Transformer3.1.1Transformer结构图3.1.2 Transformer结构图 * 关于Transformer的详细原…

AI绘图:chatGpt,midjourney, discord

一、关键词模板&#xff1a; image prompts: text prompts: 内容特征、画风、艺术效果、视角、背景、灯光 等等 parameters: 参数、模型 二、midjourney指令&#xff1a; 三、chatgpt 数据训练 输入模型信息训练 输入示例继续学习 然后告诉chatgpt以下要求来生成一段自然…

【ChatGPT|AI 应用】ChatGPT + MindShow 快速制作 PPT

应用背景 步入信息化时代&#xff0c;或多或少都需要做各种 PPT&#xff0c;比如&#xff1a;论文答辩 PPT&#xff0c;项目演示 PPT&#xff0c;主题班会 PPT&#xff0c;技术评审 PPT 等等&#xff0c;然而很多同学制作 PPT 的难点在于 PPT 的背景图片、排版的选择与思考。 …

OpenAI ChatGPT 3.5模型和清华开源ChatGLM-6B模型的对比,到底ChatGPT强在哪里(内含几个国内GPT可用途径)

目录 前言&#xff1a; &#xff08;1&#xff09;环境 &#xff08;2&#xff09;比较用例 &#xff08;a&#xff09;中文提问&#xff1a;用java写冒泡排序算法 &#xff08;b&#xff09;中文提问&#xff1a;a10,b6,不新增变量&#xff0c;怎么交换a和b的值&#xff…

OpenAI ChatGPT模型训练

打开VSCode 新建一个工作目录 使用pip install --upgrade openai 配置环境变量&#xff1a; OPENAI_API_KEY<你的open ai key> windows配置:(需要重启) setx OPENAI_API_KEY "你的open ai key" 准备训练数据集文件&#xff1a; 格式如下&#xff1a; 放到工作目…