kevinhug commited on
Commit
2ea584d
·
1 Parent(s): 5ebb309

async correct

Browse files
Files changed (3) hide show
  1. app.py +3 -3
  2. entity.py +2 -2
  3. knowledge.py +1 -1
app.py CHANGED
@@ -281,8 +281,8 @@ Customer: "No, thank you."
281
  gr.Markdown("""
282
  Example of Customer Profile in Graph
283
  =================
284
- ![Customer Needs and Pain Points](knowledge_graph1.png)
285
- ![Accumulated Interaction for the same Customer Needs and Pain Points](knowledge_graph2.png)
286
 
287
  Benefits of a Knowledge Graph
288
  ============
@@ -447,7 +447,7 @@ Customer: "No, thank you."
447
  gr.Markdown("""
448
  Example of Call Resolution
449
  ===============
450
- ![Resolution for Clear Picture about Customer Issue](entity.png)
451
 
452
  Companies like RBC, Comcast, or BMO often face a recurring challenge: long, complex customer service calls filled with vague product references, overlapping account details, and unstructured issue descriptions. This makes it difficult for support teams and analytics engines to extract clear insights or resolve recurring pain points across accounts and products.
453
 
 
281
  gr.Markdown("""
282
  Example of Customer Profile in Graph
283
  =================
284
+ ![Customer Needs and Pain Points](./knowledge_graph1.png)
285
+ ![Accumulated Interaction for the same Customer Needs and Pain Points](./knowledge_graph2.png)
286
 
287
  Benefits of a Knowledge Graph
288
  ============
 
447
  gr.Markdown("""
448
  Example of Call Resolution
449
  ===============
450
+ ![Resolution for Clear Picture about Customer Issue](./entity.png)
451
 
452
  Companies like RBC, Comcast, or BMO often face a recurring challenge: long, complex customer service calls filled with vague product references, overlapping account details, and unstructured issue descriptions. This makes it difficult for support teams and analytics engines to extract clear insights or resolve recurring pain points across accounts and products.
453
 
entity.py CHANGED
@@ -5,9 +5,9 @@ from typing import List
5
  import instructor
6
  import os
7
 
8
- from groq import AsyncGroq
9
  # Initialize with API key
10
- client = AsyncGroq(api_key=os.getenv("GROQ_API_KEY"))
11
 
12
  # Enable instructor patches for Groq client
13
  client = instructor.from_groq(client)
 
5
  import instructor
6
  import os
7
 
8
+ from groq import Groq
9
  # Initialize with API key
10
+ client = Groq(api_key=os.getenv("GROQ_API_KEY"))
11
 
12
  # Enable instructor patches for Groq client
13
  client = instructor.from_groq(client)
knowledge.py CHANGED
@@ -155,7 +155,7 @@ def expandIssue(input) -> Iterable[Subissue]:
155
 
156
  def graph(query, queryx):
157
  #queryx = expandIssue(query)
158
- if queryx.strip() == "":
159
  graph = generate_graph(query)
160
  else:
161
  graph = generate_graph(query, KnowledgeGraph.model_validate_json(queryx))
 
155
 
156
  def graph(query, queryx):
157
  #queryx = expandIssue(query)
158
+ if queryx is None:
159
  graph = generate_graph(query)
160
  else:
161
  graph = generate_graph(query, KnowledgeGraph.model_validate_json(queryx))