Coder Social home page Coder Social logo

codexchallenge's Introduction

CodeX - Web Behavior Simulation Tool ๐ŸŒ

Overview

This tool is designed to simulate user behavior on web pages, such as movements, clicks, scrolls, and stops, and generate heatmaps based on these interactions. It supports simulating specific user journeys with goals or interactions on the website and creates detailed reports. The tool is built with scalability in mind and utilizes a structured approach to manage different types of actions. ๐Ÿš€๐Ÿ‘จโ€๐Ÿ’ป

Web Automation Picture

๐Ÿง  Engines Deep Dive

The tool incorporates three distinct engines to simulate user behavior:

Online AI Engine ๐ŸŒ๐Ÿ’ก

  • Technology Used: OpenAI models, including ChatGPT.
  • Description: This engine leverages OpenAI's powerful models to simulate complex user behaviors on web pages. It requires an OpenAI API key and uses the models to generate sequences of user actions based on the content of the web page and a given user profile. ๐Ÿ—๏ธ๐Ÿ”ฎ

Offline Engine ๐Ÿ› ๏ธ๐Ÿ

  • Technology Used: Python.
  • Description: A highly accurate and efficient engine built with conditional logic. It generates sequences of user actions without the need for external AI models. This engine is particularly useful for simulating straightforward user behaviors based on predefined logic. ๐ŸŽ๏ธ๐Ÿ’จ

Offline AI Engine ๐Ÿค–๐Ÿ”Œ

  • Technology Used: Ollama, Python.
  • Description: Utilizes the Ollama library to run models like Llama 3, Phi 3, and others on local machines. This engine is free and open-source, making it an excellent choice for projects with limited budgets. However, it requires significant GPU resources. The Llama3:8b model is used for simulating user actions. ๐ŸŒŸ๐Ÿ†“

๐Ÿ“š Action Structure

The tool's architecture includes a dedicated action file for each type of user interaction, located in the actions/ directory. This modular approach enhances the tool's scalability and maintainability. ๐Ÿ› ๏ธ๐Ÿ“ˆ The engines output sequences of actions in a structured format, such as:

{
  "type": "scroll",
  "parameters": {
    "direction": "down",
    "times": 5
  }
},
{
  "type": "clickCSS",
  "parameters": {
    "target": "button[id='myButton']"
  }
},
...

๐Ÿ“Š Heatmap Generation ๐ŸŒก๏ธ๐Ÿ”ฅ

The tool generates heatmaps based on the simulated user interactions, providing visual insights into user engagement and behavior on the website. These heatmaps can be customized based on the type of interactions simulated and the goals of the analysis. ๐ŸŽจ๐Ÿ“ˆ Library used: Heatmap.js ๐Ÿ“š๐Ÿ”—

How to Use ๐Ÿš€

  1. Install Dependencies: Run pip install -r requirements.txt to install the required Python libraries. ๐Ÿ› ๏ธ
  2. Provide openai API key in a .env file following the format in .env.sample.
  3. Ollama installation is required for the Offline AI Engine. Follow the Ollama Installation Guide to set up the required environment and make sure llama3:8b model is available for use.
  4. Run the Tool: Execute the execute_actions.py script using python execute_actions.py and follow the prompts to select the engine and provide the necessary inputs. ๐Ÿš€

๐Ÿ› ๏ธ Technology Stack Power-Up

  • Python ๐Ÿ: The backbone of your engines and action logic, providing the flexibility and power needed for web behavior simulation.

  • Helium ๐ŸŽˆ: Simplifies web automation, making it a breeze to execute simulated actions across browsers.

  • Ollama ๐Ÿฆ™: Powers the Offline AI Engine with its open-source AI models, perfect for running complex simulations locally.

  • GPT (OpenAI) ๐Ÿง : The brain behind the Online AI Engine, generating realistic user action sequences.

  • WebDriver Manager ๐Ÿš—: Ensures your browser drivers are always up to date, critical for seamless web automation tasks.

Configuration

To use the Online AI Engine, you must provide your OpenAI API key. Place the key in a .env file, following the format provided in .env.sample.

Conclusion

This web behavior simulation tool offers a versatile and scalable solution for simulating user interactions on websites. With its three engines, it caters to a wide range of requirements, from simple, logic-based simulations to complex, AI-driven user behavior modeling.

codexchallenge's People

Contributors

revisto avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.