Spaces:
Running
Running
Commit
·
3822b4d
1
Parent(s):
65bef5c
fix
Browse files- __pycache__/agents.cpython-310.pyc +0 -0
- __pycache__/app.cpython-310.pyc +0 -0
- agents.py +1 -2
- app.py +2 -2
__pycache__/agents.cpython-310.pyc
CHANGED
Binary files a/__pycache__/agents.cpython-310.pyc and b/__pycache__/agents.cpython-310.pyc differ
|
|
__pycache__/app.cpython-310.pyc
CHANGED
Binary files a/__pycache__/app.cpython-310.pyc and b/__pycache__/app.cpython-310.pyc differ
|
|
agents.py
CHANGED
@@ -10,8 +10,7 @@ def get_llm(model = "gpt4o-0513"):
|
|
10 |
return openai_llm(model)
|
11 |
|
12 |
def get_llms():
|
13 |
-
|
14 |
-
main_llm = get_llm("gpt-4o-2024-08-06")
|
15 |
cheap_llm = get_llm("gpt-4o-mini")
|
16 |
return main_llm,cheap_llm
|
17 |
|
|
|
10 |
return openai_llm(model)
|
11 |
|
12 |
def get_llms():
|
13 |
+
main_llm = get_llm("gpt4o-0513")
|
|
|
14 |
cheap_llm = get_llm("gpt-4o-mini")
|
15 |
return main_llm,cheap_llm
|
16 |
|
app.py
CHANGED
@@ -364,11 +364,10 @@ script_template = """
|
|
364 |
def form_get():
|
365 |
|
366 |
script = script_template.format(user_id=str(uuid.uuid4()), state="generate")
|
367 |
-
print(script)
|
368 |
return Template(html_template).render(idea= "This is a example of the idea geneartion", error=None, reply_count=reply_count,button_text="Generate",loading_text="Generating content, Usually takes 3-4 minutes, please wait...",script=script)
|
369 |
|
370 |
@app.post("/", response_class=HTMLResponse)
|
371 |
-
def form_post(
|
372 |
global reply_count
|
373 |
start_time = time.time()
|
374 |
|
@@ -402,6 +401,7 @@ def form_post(request: Request,response: Response,topic: str = Form(...), user_i
|
|
402 |
script = script_template.format(user_id=user_id, state=new_state)
|
403 |
print(f"current2 user_id={user_id}, state={new_state}")
|
404 |
# 判断当前是否轮到该用户,如果没轮到则一直等待到轮到为止
|
|
|
405 |
while queue.queue[0] != [user_id,topic]:
|
406 |
time.sleep(10)
|
407 |
continue
|
|
|
364 |
def form_get():
|
365 |
|
366 |
script = script_template.format(user_id=str(uuid.uuid4()), state="generate")
|
|
|
367 |
return Template(html_template).render(idea= "This is a example of the idea geneartion", error=None, reply_count=reply_count,button_text="Generate",loading_text="Generating content, Usually takes 3-4 minutes, please wait...",script=script)
|
368 |
|
369 |
@app.post("/", response_class=HTMLResponse)
|
370 |
+
def form_post(topic: str = Form(...), user_id: str = Form(...), state: str = Form(...)):
|
371 |
global reply_count
|
372 |
start_time = time.time()
|
373 |
|
|
|
401 |
script = script_template.format(user_id=user_id, state=new_state)
|
402 |
print(f"current2 user_id={user_id}, state={new_state}")
|
403 |
# 判断当前是否轮到该用户,如果没轮到则一直等待到轮到为止
|
404 |
+
print(len(queue.queue),queue.queue[0])
|
405 |
while queue.queue[0] != [user_id,topic]:
|
406 |
time.sleep(10)
|
407 |
continue
|