async correct
Browse files- app.py +3 -3
- entity.py +2 -2
- 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 |
-

|
285 |
-

|
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 |
-

|
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 |
+

|
285 |
+

|
286 |
|
287 |
Benefits of a Knowledge Graph
|
288 |
============
|
|
|
447 |
gr.Markdown("""
|
448 |
Example of Call Resolution
|
449 |
===============
|
450 |
+

|
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
|
9 |
# Initialize with API key
|
10 |
-
client =
|
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
|
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))
|