提交 3bad0cdb 编写于 作者: 小傅哥's avatar 小傅哥

小傅哥,feat:gpt-2 java 模型

上级 eeacd02b
......@@ -41,6 +41,7 @@ public class ZsxqApi implements IZsxqApi {
get.addHeader("cookie", cookie);
get.addHeader("Content-Type", "application/json;charset=utf8");
get.addHeader("user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36");
CloseableHttpResponse response = httpClient.execute(get);
if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
......
......@@ -74,6 +74,10 @@
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
</dependency>
<!-- <dependency>
<groupId>com.simiacryptus</groupId>
<artifactId>tf-gpt-2</artifactId>
</dependency>-->
<dependency>
<groupId>cn.bugstack.ai</groupId>
......
......@@ -23,6 +23,11 @@ import java.util.Base64;
*/
public class ApiTest {
public static void main(String[] args) {
TextGenerator textGenerator = GPT2Util.get345M();
System.out.println(textGenerator.generateText(500));
}
@Test
public void base64(){
String cronExpression = new String(Base64.getDecoder().decode("MC81MCAqICogKiAqID8="), StandardCharsets.UTF_8);
......@@ -33,9 +38,9 @@ public class ApiTest {
public void query_unanswered_questions() throws IOException {
CloseableHttpClient httpClient = HttpClientBuilder.create().build();
HttpGet get = new HttpGet("https://api.zsxq.com/v2/groups/48411118851818/topics?scope=unanswered_questions&count=20");
HttpGet get = new HttpGet("https://api.zsxq.com/v2/groups/28885518425541/topics?scope=unanswered_questions&count=20");
get.addHeader("cookie", "知识星球个人cookie信息");
get.addHeader("cookie", "zsxq_access_token=77D0F49F-1B2; abtest_env=product; zsxqsessionid=5673f4269d07");
get.addHeader("Content-Type", "application/json;charset=utf8");
CloseableHttpResponse response = httpClient.execute(get);
......
欢迎加入《ChatGPT AI 问答助手》开源免费项目的学习,你会在这次实战开发中,可以了解 ChatGTP AI 的使用,掌握 SpringBoot DDD 工程创建、DDD领域服务设计、爬虫接口、镜像打包、容器化部署等内容。非常具有学习价值。
[脱单doge]欢迎加入《ChatGPT AI 问答助手》开源免费项目的学习,你会在这次实战开发中,可以了解 ChatGTP AI 的使用,掌握 SpringBoot DDD 工程创建、DDD领域服务设计、爬虫接口、镜像打包、容器化部署等内容。非常具有学习价值。
项目源码:
[给心心]项目源码:
- Github:https://github.com/fuzhengwei/chatbot-api
- Gitcode:https://gitcode.net/fuzhengwei/chatbot-api
加入体验:https://wx.zsxq.com/dweb2/index/group/28885518425541 - 这个就是《ChatGPT AI 问答助手》的项目体现,你可以对它在手机端进行提问。
[哦呼]加入体验:https://wx.zsxq.com/dweb2/index/group/28885518425541 - 这个就是《ChatGPT AI 问答助手》的项目体现,你可以对它在手机端进行提问。
项目交流:添加小傅哥微信【fustack】备注【问答助手学习加群】
[辣眼睛]项目交流:添加小傅哥微信【fustack】备注【问答助手学习加群】
其他项目:https://www.bilibili.com/video/BV1KG411T7DG https://www.bilibili.com/video/BV1nY4y1B7eT
\ No newline at end of file
[点赞]其他项目:https://www.bilibili.com/video/BV1KG411T7DG https://www.bilibili.com/video/BV1nY4y1B7eT
\ No newline at end of file
......@@ -87,6 +87,11 @@
<artifactId>hutool-all</artifactId>
<version>5.8.10</version>
</dependency>
<dependency>
<groupId>com.simiacryptus</groupId>
<artifactId>tf-gpt-2</artifactId>
<version>1.7.1</version>
</dependency>
</dependencies>
</dependencyManagement>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册