AI Integration in Wappler

I know you directed the question at Teodor but thought I'd respond in the interim @Antony

I'm not sure how Wapplers integration is working as Copilot wants me to sign up for a Pro account to use it and am not doing that. I'll assume reading above and the documentation that you can select a parent node. So for example if you select the main container for the page then you should be able to instruct Copilot to add the classes to your specified elements. I believe this will be on a page by page basis and not the full scope of your Project. For that you will need something a little more powerful and provide it with explicit instructions (prompts) and examples. BUT backup first! Also if there are thousands of lines of source the model has to ingest this can become expensive with certain models such as Claude and ChatGPT. Other models such as Qwen would do it for a few Cents where as Claude and ChatGPT could easily run in to tens of Dollars.

The same as above. You will need to either do this on a page by page basis or provide the entire source of your Project to the model you wish to use (the cost can soon mount up with a large code base).

I don't believe the Wappler implementations offers any form of caching for your prompt history? On top of that I'm not sure about Copilot and its caching ability either... Without caching things can become costly very quickly as the 'chat' you have with the model will soon exceed the token limit so you'll need to begin a new chat and with models such as Claude and ChatGPT any history of previous chats will be discarded so you'll essentially begin again unless you provide the model with training data (instructions and examples). Basic principles apply. Good input good output! You'll only ever get a response based upon your prompt. And like mentioned above prompting is actually a skill if you want to get the best out of it...

No need to apologise @Antony it is an absolute minefield hahahaha.

1 Like

Not true … you can use it with the free plan.

Screenshot from 2025-02-27 19-03-53

I get the same response on two separate Git accounts.

1 Like

I faced the same 'sign up for pro" issue initially.

Make sure you sign out of github before linking then follow the instructions exactly

1 Like

The AI is smart enough to add them if you describe them and tell him to do so.

The knowledge about App Connect is not very good currently by the AI models, it does add the tags if you ask him to do so, but I noticed that expressions are often incorrectly generated.

Currently you have to do that if you want to provide it extra content that is not in your current html. We only pass the html of the current editor as context, we plan to give the AI more context in the future like the css file and other related files so that it can use those for generating better results using the classes you created. Also we currently don't support conversations, so it doesn't know about your previous questions.

1 Like

Ok now Wappler has my attention again!!

Wappler already has the quick open search bar so I think the same functionality would be useful for referencing files when using the new AI integration. Cursor, Windsurf etc let you reference files by typing @ and then a search dialog opens which forwards the path or in Cursors and Windsurfs case the embedding to the model. One example: That way a specific style sheet could be added easily to the context

Does Copilot allow us to add our files to a vector database to solve this?

Good idea indeed and some files are can include automatically like the linked style.css and linked layout page for example and provide instructions to the AI model how to return results to be placed / edited there

1 Like

It doesn’t. I think it creates its own vector db when using vscode but not sure. I only know for sure that Cursor and Windsurf automatically index all files and then create the embeddings. So if Wappler would want to go that route they would need to do that on their end, then search the vector db and add what’s needed to the context when sending the request to copilot.

Vector databases are usually used to store relations and document vectors so related searches can be done. We are investigating how those can be useful in the world of server connect and app connect as there ermee already know most of the relations so we can usually pas those as context, no need to search specific vectors for this.

What for would you like to use vector databases?

I am by no means an expert and you may have seen my posts on AnythingLLM

I believe ingesting my repositories and other relevant documents (even scraping this forum) helps provide more accurate and in-depth answers without having to constantly provide code during conversations.

For example, here's a question I asked in AnythingLLM which has two project repositories and some other Wappler info that I've added into the vector db.

Question:
Does using a vector database, like we're doing here, help you understand more about my app and Wappler? Thereby allowing you to provide better answers?

Answer:

Yes, using a vector database to provide additional context significantly helps me understand more about your app and Wappler, thereby allowing me to provide better answers. Here's how it enhances our interaction:

  1. Access to Specific Information about Your App:

    • Detailed Insights: The documents and files you've added to the vector database give me detailed insights into your application's structure, code, workflows, and the specific technologies you're using.
    • Customized Assistance: With access to your actual code snippets, configurations, and project details, I can tailor my responses to address the specific challenges or questions you have regarding your app.
  2. Deeper Understanding of Your Use of Wappler:

    • Framework Integration: By seeing how you integrate various Wappler components like App Connect, Server Connect, and Capacitor plugins, I can better understand your implementation.
    • Identifying Potential Issues: Access to your project files allows me to identify potential issues or areas for optimization that are directly relevant to your setup.
  3. Enhanced Context for Problem-Solving:

    • Specific Scenarios: The added context enables me to consider the exact scenarios you're dealing with, such as performance bottlenecks, implementation challenges, or integration complexities.
    • Relevant Recommendations: I can provide recommendations that are more relevant and practical because they're based on your actual code and project structure.
  4. Improved Accuracy and Relevance:

    • Reducing Assumptions: Without access to your files, I might need to make assumptions about your setup. The vector database reduces the need for assumptions by supplying concrete information.
    • Contextual Responses: My answers can reference specific parts of your code or configuration, making them more actionable.
  5. Learning from Your Project's Specifics:

    • Adapting to Your Environment: Understanding the versions of libraries you're using, the way you've structured your database, or how you've implemented certain functionalities helps me adapt my explanations to fit your environment.
    • Addressing Unique Configurations: If you've customized or extended default functionalities, having that information allows me to account for those changes in my responses.

Example of How It Helps:

  • Optimizing SQLite Queries: When you asked about optimizing your SQLite queries, having access to your actual SQL statements and knowledge about the database structure (like the mail.sqlite3 file and the Email table) allowed me to provide specific indexing and query optimization suggestions.
  • Understanding Workflow Implementations: In your Gmail integration, knowing the exact flows and how you're handling data fetching and UI updates helped me recommend strategies within the constraints of Wappler App Connect and avoid solutions that aren't applicable to your setup.

Conclusion:

By using a vector database to share relevant documents and files, you enhance my ability to assist you effectively. It bridges the gap between general knowledge and your specific use case, enabling me to offer detailed, accurate, and practical advice that directly applies to your app. This collaborative approach leads to better problem-solving and helps you advance your project more efficiently.

If you have more files or specific areas you'd like me to focus on, feel free to share, and I'll be happy to provide further assistance!

3 Likes

WTF!!!!!!!!!!! Wooohoooooooo Lets Play baby!

Just playing around for a client of mine:

7 Likes

1 Like

I think another great addition would be allowing us to add image references to a request. This would make it very easy to copy Figma designs etc.

Simple prompt does not work,

"Create a text input field that accepts an 11-digit number. If the user enters precisely 11 digits, automatically remove the first two characters."

Below is what was generated.

<input type="text" class="form-control" id="strCardProxy" name="strCardProxy" aria-describedby="input1_help" placeholder="Enter 9-digit number as shown above" required data-rule-nowhitespace data-rule-number dmx-bind:value="ddActivationCards.data.card" maxlength="11" minlength="9" autofocus data-msg-letterswithbasicpunc data-rule-pattern="^[0-9]*$" data-msg-notequalto dmx-on:keyup="if(this.value.length === 11){this.value = this.value.substring(2)}; serverconnect_checkcard.load({strcardproxy: value})" />

When I click on the actions editor, I get this error on the screen.

So, some work is needed to make it useful.

@George Should I raise this as a bug, or is this something that is expected at this early stage?

I wouldn't call this a bug.
As Patrick explained a few posts back:

The AI model you chose is not really familiar with the dmx-on: dynamic events of App Connect, so it added some js function there, which is wrong. You can't use js code with App Connect dynamic events:

dmx-on:keyup="if(this.value.length === 11){this.value = this.value.substring(2)}; serverconnect_checkcard.load({strcardproxy: value})"

so this part should not be there:

if(this.value.length === 11){this.value = this.value.substring(2)};

You should always check the code generated by any AI, especially with such custom js function and app connect attributes.

Hi Teodor,

Yes, I agree; this was just a little stress test I did to see how it would behave.

Thanks
Ray

3 Likes