diff --git a/example.html b/example.html
index 783a985..02133da 100644
--- a/example.html
+++ b/example.html
@@ -37,6 +37,15 @@
text
: The text to display in the bubble
style
: (Optional) Bubble style
+
+
Important: Make sure function calling is enabled in SillyTavern's AI settings and the model you're using supports function calling.
+
In SillyTavern's AI settings, verify that:
+
+ - Function calling is enabled
+ - "Include functions in context" is checked
+ - The function appears in the function list
+
+
diff --git a/index.js b/index.js
index 79b7ef0..f3f8009 100644
--- a/index.js
+++ b/index.js
@@ -119,11 +119,26 @@ jQuery(async () => {
required: false,
}
],
+ isPublic: true, // Make sure function is exposed to the AI
run: async function(text, style) {
return generateChatBubbleImage(text, style);
}
});
+ // Log to console to verify registration
+ console.log(`[${extensionName}] Function registered: generateChatBubbleImage`);
+
+ // Add to context if needed - this might be required to expose to AI
+ try {
+ const context = getContext();
+ if (context && typeof context.addExtensionFunction === 'function') {
+ context.addExtensionFunction('generateChatBubbleImage', generateChatBubbleImage);
+ console.log(`[${extensionName}] Function added to context: generateChatBubbleImage`);
+ }
+ } catch (error) {
+ console.error(`[${extensionName}] Error adding function to context:`, error);
+ }
+
// Load settings
loadSettings();
});
diff --git a/style.css b/style.css
index 518fb7b..8b5dce3 100644
--- a/style.css
+++ b/style.css
@@ -35,6 +35,17 @@
font-family: monospace;
}
+.sillybubble_important {
+ margin-top: 10px;
+ padding: 10px;
+ border-left: 3px solid #e74c3c;
+ background-color: rgba(231, 76, 60, 0.1);
+}
+
+.sillybubble_important strong {
+ color: #e74c3c;
+}
+
.sillybubble-test pre {
background-color: rgba(0, 0, 0, 0.1);
padding: 10px;