acecalisto3 commited on
Commit
2b4ebc1
·
verified ·
1 Parent(s): 2ddd716

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +51 -23
app.py CHANGED
@@ -21,6 +21,56 @@ VERBOSE = True
21
  MAX_HISTORY = 100
22
  #MODEL = "gpt-3.5-turbo" # "gpt-4"
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
  def format_prompt(message, history):
26
  prompt = "<s>"
@@ -335,7 +385,7 @@ additional_inputs=[
335
  ]
336
 
337
  examples = [
338
- ["Help me set up TypeScript configurations and integrate ts-loader in my existing React project.",
339
  "Update Webpack Configurations",
340
  "Install Dependencies",
341
  "Configure Ts-Loader",
@@ -372,28 +422,6 @@ examples = [
372
  "Seamless Web Assembly Embedding"]
373
  ]
374
 
375
- '''
376
- gr.ChatInterface(
377
- fn=run,
378
- chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, likeable=True, layout="panel"),
379
- title="Mixtral 46.7B\nMicro-Agent\nInternet Search <br> development test",
380
- examples=examples,
381
- concurrency_limit=20,
382
- with gr.Blocks() as ifacea:
383
- gr.HTML("""TEST""")
384
- ifacea.launch()
385
- ).launch()
386
- with gr.Blocks() as iface:
387
- #chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, likeable=True, layout="panel"),
388
- chatbot=gr.Chatbot()
389
- msg = gr.Textbox()
390
- with gr.Row():
391
- submit_b = gr.Button()
392
- clear = gr.ClearButton([msg, chatbot])
393
- submit_b.click(run, [msg,chatbot],[msg,chatbot])
394
- msg.submit(run, [msg, chatbot], [msg, chatbot])
395
- iface.launch()
396
- '''
397
  gr.ChatInterface(
398
  fn=run,
399
  chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, likeable=True, layout="panel"),
 
21
  MAX_HISTORY = 100
22
  #MODEL = "gpt-3.5-turbo" # "gpt-4"
23
 
24
+ PREFIX = """
25
+ {date_time_str}
26
+ Purpose: {purpose}
27
+ Safe Search: {safe_search}
28
+ """
29
+
30
+ LOG_PROMPT = """
31
+ PROMPT: {content}
32
+ """
33
+
34
+ LOG_RESPONSE = """
35
+ RESPONSE: {resp}
36
+ """
37
+
38
+ COMPRESS_HISTORY_PROMPT = """
39
+ You are a helpful AI assistant. Your task is to compress the following history into a summary that is no longer than 512 tokens.
40
+
41
+ History:
42
+ {history}
43
+ """
44
+
45
+ ACTION_PROMPT = """
46
+ You are a helpful AI assistant. You are working on the task: {task}
47
+
48
+ Your current history is:
49
+ {history}
50
+
51
+ What is your next thought?
52
+ thought:
53
+
54
+ What is your next action?
55
+ action:
56
+
57
+ """
58
+
59
+ TASK_PROMPT = """
60
+ You are a helpful AI assistant. Your current history is:
61
+ {history}
62
+
63
+ What is the next task?
64
+ task:
65
+ """
66
+
67
+ UNDERSTAND_TEST_RESULTS_PROMPT = """
68
+ You are a helpful AI assistant. The test results are:
69
+ {test_results}
70
+
71
+ What do you want to know about the test results?
72
+ thought:
73
+ """
74
 
75
  def format_prompt(message, history):
76
  prompt = "<s>"
 
385
  ]
386
 
387
  examples = [
388
+ ["Help me set up TypeScript configurations and integrate ts-loader in my existing React project.",
389
  "Update Webpack Configurations",
390
  "Install Dependencies",
391
  "Configure Ts-Loader",
 
422
  "Seamless Web Assembly Embedding"]
423
  ]
424
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
425
  gr.ChatInterface(
426
  fn=run,
427
  chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, likeable=True, layout="panel"),