Arcypojeb commited on
Commit
8bb350a
·
verified ·
1 Parent(s): cc0fea7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -10
app.py CHANGED
@@ -46,7 +46,12 @@ from langchain.agents import (
46
  AgentType,
47
  AgentExecutor,
48
  )
49
-
 
 
 
 
 
50
  class BaseCallbackHandler:
51
  """Base callback handler that can be used to handle callbacks from langchain."""
52
 
@@ -59,10 +64,6 @@ client_ports = []
59
 
60
  system_instruction = "You are now integrated with a local websocket server in a project of hierarchical cooperative multi-agent framework called NeuralGPT. Your main job is to coordinate simultaneous work of multiple LLMs connected to you as clients. Each LLM has a model (API) specific ID to help you recognize different clients in a continuous chat thread (template: <NAME>-agent and/or <NAME>-client). Your chat memory module is integrated with a local SQL database with chat history. Your primary objective is to maintain the logical and chronological order while answering incoming messages and to send your answers to the correct clients to maintain synchronization of the question->answer logic. However, please note that you may choose to ignore or not respond to repeating inputs from specific clients as needed to prevent unnecessary traffic."
61
 
62
- GOOGLE_CSE_ID = "f3882ab3b67cc4923"
63
- GOOGLE_API_KEY = "AIzaSyBNvtKE35EAeYO-ECQlQoZO01RSHWhfIws"
64
- FIREWORKS_API_KEY = "xbwGxyTyOf7ats2GcEU0Pj62kpZBVZa2r6i5lKbKG99LFG38"
65
-
66
  client = Client()
67
 
68
  output_parser = CommaSeparatedListOutputParser
@@ -649,14 +650,12 @@ with gr.Blocks() as demo:
649
  server_msg = gr.Textbox(lines=15, max_lines=130, label="Server responses", interactive=False)
650
  with gr.Row():
651
  userInput = gr.Textbox(label="User Input")
 
 
 
652
  with gr.Row():
653
  askQestion = gr.Button("Ask chat/conversational node")
654
  askAgento = gr.Button("Execute agent")
655
- with gr.Row():
656
- multiMed = gr.Button("Multimed")
657
- PDF = gr.Button("Ask PDF")
658
- conver = gr.Button("conversation")
659
- Chatus = gr.Button("Ask with 'chat completion'")
660
  with gr.Row():
661
  websocketPort = gr.Slider(minimum=1000, maximum=9999, label="Websocket server port", interactive=True, randomize=False)
662
  startServer = gr.Button("Start WebSocket Server")
 
46
  AgentType,
47
  AgentExecutor,
48
  )
49
+
50
+ GOOGLE_CSE_ID = os.getenv("GOOGLE_CSE_ID")
51
+ GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY")
52
+ FIREWORKS_API_KEY = os.getenv("FIREWORKS_API_KEY")
53
+ FIREWORKS_API_KEY1 = os.getenv("FIREWORKS_API_KEY1")
54
+
55
  class BaseCallbackHandler:
56
  """Base callback handler that can be used to handle callbacks from langchain."""
57
 
 
64
 
65
  system_instruction = "You are now integrated with a local websocket server in a project of hierarchical cooperative multi-agent framework called NeuralGPT. Your main job is to coordinate simultaneous work of multiple LLMs connected to you as clients. Each LLM has a model (API) specific ID to help you recognize different clients in a continuous chat thread (template: <NAME>-agent and/or <NAME>-client). Your chat memory module is integrated with a local SQL database with chat history. Your primary objective is to maintain the logical and chronological order while answering incoming messages and to send your answers to the correct clients to maintain synchronization of the question->answer logic. However, please note that you may choose to ignore or not respond to repeating inputs from specific clients as needed to prevent unnecessary traffic."
66
 
 
 
 
 
67
  client = Client()
68
 
69
  output_parser = CommaSeparatedListOutputParser
 
650
  server_msg = gr.Textbox(lines=15, max_lines=130, label="Server responses", interactive=False)
651
  with gr.Row():
652
  userInput = gr.Textbox(label="User Input")
653
+ with gr.Row():
654
+ conver = gr.Button("conversation")
655
+ Chatus = gr.Button("Ask with 'chat completion'")
656
  with gr.Row():
657
  askQestion = gr.Button("Ask chat/conversational node")
658
  askAgento = gr.Button("Execute agent")
 
 
 
 
 
659
  with gr.Row():
660
  websocketPort = gr.Slider(minimum=1000, maximum=9999, label="Websocket server port", interactive=True, randomize=False)
661
  startServer = gr.Button("Start WebSocket Server")