bstraehle commited on
Commit
70bf8f7
1 Parent(s): 4be439f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -1,7 +1,6 @@
1
  # TODO:
2
  #
3
- # 1. Function calling - https://platform.openai.com/docs/assistants/tools/function-calling
4
- # 2. Gradio session / multi-user thread
5
 
6
  # Reference:
7
  #
@@ -58,7 +57,7 @@ tools = {
58
 
59
  def create_assistant(openai_client):
60
  assistant = openai_client.beta.assistants.create(
61
- name="Python Code Generator",
62
  instructions=(
63
  "You are a Python programming language expert that "
64
  "generates Pylint-compliant code and explains it. "
@@ -333,13 +332,14 @@ gr.ChatInterface(
333
  fn=chat,
334
  chatbot=gr.Chatbot(height=350),
335
  textbox=gr.Textbox(placeholder="Ask anything", container=False, scale=7),
336
- title="Python Code Generator",
337
  description=(
338
- "The assistant can **generate, explain, fix, optimize, document, and test code**. "
 
339
  "It can also **execute code**. "
340
- "It has access to a <b>today tool</b> (get current date), to a "
341
  "**yfinance download tool** (get stock data), and to a "
342
- "**tavily search tool** (web search)."
343
  ),
344
  clear_btn="Clear",
345
  retry_btn=None,
@@ -351,7 +351,7 @@ gr.ChatInterface(
351
  ["Optimize: x = []; for i in range(0, 10000): x.append(i)"],
352
  ["Execute: First 25 Fibbonaci numbers"],
353
  ["Execute with tools: Create a plot showing stock gain QTD for NVDA and AMD, x-axis is \"Day\" and y-axis is \"Gain %\""],
354
- ["Execute with tools: TODO"]
355
  ],
356
  cache_examples=False,
357
  ).launch()
 
1
  # TODO:
2
  #
3
+ # 1. Gradio session / multi-user thread
 
4
 
5
  # Reference:
6
  #
 
57
 
58
  def create_assistant(openai_client):
59
  assistant = openai_client.beta.assistants.create(
60
+ name="Python Coding Assistant",
61
  instructions=(
62
  "You are a Python programming language expert that "
63
  "generates Pylint-compliant code and explains it. "
 
332
  fn=chat,
333
  chatbot=gr.Chatbot(height=350),
334
  textbox=gr.Textbox(placeholder="Ask anything", container=False, scale=7),
335
+ title="Python Coding Assistant",
336
  description=(
337
+ "The assistant can **generate, explain, fix, optimize, and document Python code, "
338
+ "create unit test cases, and answer general coding-related questions.** "
339
  "It can also **execute code**. "
340
+ "The assistant has access to a <b>today tool</b> (get current date), to a "
341
  "**yfinance download tool** (get stock data), and to a "
342
+ "**tavily search tool** (web search for RAG)."
343
  ),
344
  clear_btn="Clear",
345
  retry_btn=None,
 
351
  ["Optimize: x = []; for i in range(0, 10000): x.append(i)"],
352
  ["Execute: First 25 Fibbonaci numbers"],
353
  ["Execute with tools: Create a plot showing stock gain QTD for NVDA and AMD, x-axis is \"Day\" and y-axis is \"Gain %\""],
354
+ ["Execute with tools: Get key announcements from the latest OpenAI Dev Day"]
355
  ],
356
  cache_examples=False,
357
  ).launch()