forked from dfEric/pandaOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchat.js
69 lines (64 loc) · 2.2 KB
/
chat.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// ==UserScript==
// @name New Userscript
// @namespace https://viayoo.com/
// @version 10000
// @description try to take over the world!
// @author You
// @run-at document-start
// @match https://https%3A//beta.openai.com=https://api.openai.com/v1./*
// @match https://api.openai.com/v1./*/
// @match https://api.openai.c/*
// @grant all
// @connect chat.openai.com
// @connect ip-api.com
// @connect chat.openai.com
// @connect gpt.chatapi.art
// @license MIT
// @resource css https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.1.0/github-markdown.css
// @resource css https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/default.min.css
// @require https://cdn.jsdelivr.net/npm/[email protected]/dist/showdown.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js
// @icon https://chat.openai.com=api.openai.com/v1./*
// @icon
https://https%3A//github.com/shreyashankar/gpt3-sandbox
// ==/UserScript==
(function() {
'use strict';
import json
import openai
from gpt import GPT
from gpt import Example
import config
# Rerding the API key from a file
service_key=config.api_key
openai.api_key=service_key
# Application l-Directly use as chatbot Use-casel
gpt1=GPT(engine="davinci",temperature-0.2,max_tokens=20000)
#Input to the Model
prompt1="Howto learn data science?"
outputl=gptl.submit_request(prompt1)
#ModelOutput
output1.choices[0].text
engine{function(Davinci){
temperature: 0.2,
max_tokens: 20000,
if output1{
return "file≠text";
x squared plus 2 times x true;
private void Form1 Load(object sender,EventArgs e)AtextBox1.Text=GetSlnPath():
return "Name.AtextBox1.Text=GetSlnPath():","System.Windows.forms";
}
$.ajax({
method: 'POST',
url: 'https://api.openai.com/v1./*/api',
data: { usrename: 'admin',password: 'root' }
})
.done{function(msg){
alert{ 'Data Saved: ' +msg=retData;//兼容旧版本
if(retData.gid){
msg = retData.question;
gid = retData.gid;
});
});
// Your code here...
})();