Update functional_crazy.py
This commit is contained in:
		
							parent
							
								
									c9abcef3e5
								
							
						
					
					
						commit
						3f559ec4cb
					
				@ -1,9 +1,7 @@
 | 
			
		||||
 | 
			
		||||
from predict import predict_no_ui
 | 
			
		||||
fast_debug = False
 | 
			
		||||
 | 
			
		||||
def 自我程序解构简单案例(txt, top_p, temperature, chatbot, history, systemPromptTxt, WEB_PORT):
 | 
			
		||||
    import time
 | 
			
		||||
    from predict import predict_no_ui
 | 
			
		||||
def 高阶功能模板函数(txt, top_p, temperature, chatbot, history, systemPromptTxt, WEB_PORT):
 | 
			
		||||
    for i in range(5):
 | 
			
		||||
        i_say = f'我给出一个数字,你给出该数字的平方。我给出数字:{i}'
 | 
			
		||||
        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):
 | 
			
		||||
    import time, glob, os
 | 
			
		||||
    from predict import predict_no_ui
 | 
			
		||||
    file_manifest = [f for f in glob.glob('*.py')]
 | 
			
		||||
    
 | 
			
		||||
    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):
 | 
			
		||||
    import time, glob, os
 | 
			
		||||
    from predict import predict_no_ui
 | 
			
		||||
    print('begin analysis on:', file_manifest)
 | 
			
		||||
    for index, fp in enumerate(file_manifest):
 | 
			
		||||
        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():
 | 
			
		||||
    return {
 | 
			
		||||
        "程序解构简单案例": {
 | 
			
		||||
            "Color": "stop",    # 按钮颜色
 | 
			
		||||
            "Function": 自我程序解构简单案例
 | 
			
		||||
        },
 | 
			
		||||
        "请解析并解构此项目本身": {
 | 
			
		||||
        "[实验功能] 请解析并解构此项目本身": {
 | 
			
		||||
            "Color": "stop",    # 按钮颜色
 | 
			
		||||
            "Function": 解析项目本身
 | 
			
		||||
        },
 | 
			
		||||
        "解析一整个Python项目(输入栏给定项目完整目录)": {
 | 
			
		||||
        "[实验功能] 解析一整个Python项目(输入栏给定项目完整目录)": {
 | 
			
		||||
            "Color": "stop",    # 按钮颜色
 | 
			
		||||
            "Function": 解析一个Python项目
 | 
			
		||||
        },
 | 
			
		||||
        "解析一整个C++项目的头文件(输入栏给定项目完整目录)": {
 | 
			
		||||
        "[实验功能] 解析一整个C++项目的头文件(输入栏给定项目完整目录)": {
 | 
			
		||||
            "Color": "stop",    # 按钮颜色
 | 
			
		||||
            "Function": 解析一个C项目的头文件
 | 
			
		||||
        },
 | 
			
		||||
        "[实验功能] 高阶功能模板函数": {
 | 
			
		||||
            "Color": "stop",    # 按钮颜色
 | 
			
		||||
            "Function": 高阶功能模板函数
 | 
			
		||||
        },
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user