Spaces:
Sleeping
Sleeping
Update static/graph-maker.html
Browse files- static/graph-maker.html +5 -2
static/graph-maker.html
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
<!DOCTYPE html>
|
2 |
<html lang="en">
|
3 |
<head>
|
@@ -215,6 +216,7 @@
|
|
215 |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/html2canvas.min.js"></script>
|
216 |
<script src="https://bumbu.me/svg-pan-zoom/dist/svg-pan-zoom.min.js"></script>
|
217 |
<script src="https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js"></script>
|
|
|
218 |
<script>
|
219 |
mermaid.initialize({
|
220 |
startOnLoad: false,
|
@@ -281,12 +283,13 @@
|
|
281 |
container.innerHTML = '';
|
282 |
|
283 |
try {
|
|
|
284 |
const response = await axios.post(API_ENDPOINT, {
|
285 |
prompt: `Generate Mermaid syntax for the following chart description: ${chartDescription.value} enclosed in <chart> </chart> tags. Respond only with the Mermaid syntax, no additional text.`,
|
286 |
system_message: "You are a Mermaid chart Maker. Respond only with the Mermaid syntax enclosed in <chart> </chart> tags. No additional text.",
|
287 |
model_id: "anthropic/claude-3.5-sonnet",
|
288 |
-
conversation_id:
|
289 |
-
user_id: "
|
290 |
}, {
|
291 |
headers: {
|
292 |
'accept': 'application/json',
|
|
|
1 |
+
|
2 |
<!DOCTYPE html>
|
3 |
<html lang="en">
|
4 |
<head>
|
|
|
216 |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/html2canvas.min.js"></script>
|
217 |
<script src="https://bumbu.me/svg-pan-zoom/dist/svg-pan-zoom.min.js"></script>
|
218 |
<script src="https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js"></script>
|
219 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/uuid/8.3.2/uuid.min.js"></script>
|
220 |
<script>
|
221 |
mermaid.initialize({
|
222 |
startOnLoad: false,
|
|
|
283 |
container.innerHTML = '';
|
284 |
|
285 |
try {
|
286 |
+
const conversationId = uuid.v4();
|
287 |
const response = await axios.post(API_ENDPOINT, {
|
288 |
prompt: `Generate Mermaid syntax for the following chart description: ${chartDescription.value} enclosed in <chart> </chart> tags. Respond only with the Mermaid syntax, no additional text.`,
|
289 |
system_message: "You are a Mermaid chart Maker. Respond only with the Mermaid syntax enclosed in <chart> </chart> tags. No additional text.",
|
290 |
model_id: "anthropic/claude-3.5-sonnet",
|
291 |
+
conversation_id: conversationId,
|
292 |
+
user_id: "ai-chart-generator",
|
293 |
}, {
|
294 |
headers: {
|
295 |
'accept': 'application/json',
|