Commit History

max_tokens=500 * rounds # 設定一個較大的值,可根據需要調整
0ff0132

youngtsai commited on

ne desult
d335288

youngtsai commited on

gr.components.Textbox(label="角色 2 名稱", default="Alex"),
005e338

youngtsai commited on

main_function,
bd1aa67

youngtsai commited on

sys_content = f"你是一個英文家教,請用英文生成對話"
77a2db1

youngtsai commited on

gr.components.Textbox(label="對話主題", default="購物"), # 加入 theme 的輸入框,設定預設值為 '購物'
25e4cb4

youngtsai commited on

response = openai.ChatCompletion.create(
61cea89

youngtsai commited on

def extract_json_from_response(response_text):
b90df65

youngtsai commited on

create_chat_dialogue
bc52e2a

youngtsai commited on

def generate_dialogue_with_openai(rounds, role1, role2):
523f3ec

youngtsai commited on

response = openai.Completion.create(
8109133

youngtsai commited on

def main_function(password: str, rounds: int, method: str, role1: str, role2: str):
1e07170

youngtsai commited on

chatbot_dialogue
f2bc1ef

youngtsai commited on

print(chatbot_dialogue)
4060a57

youngtsai commited on

chatbot_dialogue = [(item["role"], item["content"]) for item in structured_dialogue]
3cf8ded

youngtsai commited on

file_name = "dialogue_output.txt"
830e7f1

youngtsai commited on

file_name = "dialogue_output.json"
82ec76e

youngtsai commited on

initial commit
00ccfda

youngtsai commited on