Update functional_crazy.py
This commit is contained in:
parent
82fe0f758d
commit
791dbf8592
@ -1,9 +1,7 @@
|
|||||||
|
from predict import predict_no_ui
|
||||||
fast_debug = False
|
fast_debug = False
|
||||||
|
|
||||||
def 自我程序解构简单案例(txt, top_p, temperature, chatbot, history, systemPromptTxt, WEB_PORT):
|
def 高阶功能模板函数(txt, top_p, temperature, chatbot, history, systemPromptTxt, WEB_PORT):
|
||||||
import time
|
|
||||||
from predict import predict_no_ui
|
|
||||||
for i in range(5):
|
for i in range(5):
|
||||||
i_say = f'我给出一个数字,你给出该数字的平方。我给出数字:{i}'
|
i_say = f'我给出一个数字,你给出该数字的平方。我给出数字:{i}'
|
||||||
gpt_say = predict_no_ui(inputs=i_say, top_p=top_p, temperature=temperature)
|
gpt_say = predict_no_ui(inputs=i_say, top_p=top_p, temperature=temperature)
|
||||||
@ -15,7 +13,6 @@ def 自我程序解构简单案例(txt, top_p, temperature, chatbot, history, sy
|
|||||||
|
|
||||||
def 解析项目本身(txt, top_p, temperature, chatbot, history, systemPromptTxt, WEB_PORT):
|
def 解析项目本身(txt, top_p, temperature, chatbot, history, systemPromptTxt, WEB_PORT):
|
||||||
import time, glob, os
|
import time, glob, os
|
||||||
from predict import predict_no_ui
|
|
||||||
file_manifest = [f for f in glob.glob('*.py')]
|
file_manifest = [f for f in glob.glob('*.py')]
|
||||||
|
|
||||||
for index, fp in enumerate(file_manifest):
|
for index, fp in enumerate(file_manifest):
|
||||||
@ -59,7 +56,6 @@ def report_execption(chatbot, history, a, b):
|
|||||||
|
|
||||||
def 解析源代码(file_manifest, project_folder, top_p, temperature, chatbot, history, systemPromptTxt):
|
def 解析源代码(file_manifest, project_folder, top_p, temperature, chatbot, history, systemPromptTxt):
|
||||||
import time, glob, os
|
import time, glob, os
|
||||||
from predict import predict_no_ui
|
|
||||||
print('begin analysis on:', file_manifest)
|
print('begin analysis on:', file_manifest)
|
||||||
for index, fp in enumerate(file_manifest):
|
for index, fp in enumerate(file_manifest):
|
||||||
with open(fp, 'r', encoding='utf-8') as f:
|
with open(fp, 'r', encoding='utf-8') as f:
|
||||||
@ -154,22 +150,22 @@ def 解析一个C项目的头文件(txt, top_p, temperature, chatbot, history, s
|
|||||||
|
|
||||||
def get_crazy_functionals():
|
def get_crazy_functionals():
|
||||||
return {
|
return {
|
||||||
"程序解构简单案例": {
|
"[实验功能] 请解析并解构此项目本身": {
|
||||||
"Color": "stop", # 按钮颜色
|
|
||||||
"Function": 自我程序解构简单案例
|
|
||||||
},
|
|
||||||
"请解析并解构此项目本身": {
|
|
||||||
"Color": "stop", # 按钮颜色
|
"Color": "stop", # 按钮颜色
|
||||||
"Function": 解析项目本身
|
"Function": 解析项目本身
|
||||||
},
|
},
|
||||||
"解析一整个Python项目(输入栏给定项目完整目录)": {
|
"[实验功能] 解析一整个Python项目(输入栏给定项目完整目录)": {
|
||||||
"Color": "stop", # 按钮颜色
|
"Color": "stop", # 按钮颜色
|
||||||
"Function": 解析一个Python项目
|
"Function": 解析一个Python项目
|
||||||
},
|
},
|
||||||
"解析一整个C++项目的头文件(输入栏给定项目完整目录)": {
|
"[实验功能] 解析一整个C++项目的头文件(输入栏给定项目完整目录)": {
|
||||||
"Color": "stop", # 按钮颜色
|
"Color": "stop", # 按钮颜色
|
||||||
"Function": 解析一个C项目的头文件
|
"Function": 解析一个C项目的头文件
|
||||||
},
|
},
|
||||||
|
"[实验功能] 高阶功能模板函数": {
|
||||||
|
"Color": "stop", # 按钮颜色
|
||||||
|
"Function": 高阶功能模板函数
|
||||||
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user