Skip to content

JoeyLLM Guide

j-sawn edited this page Aug 7, 2025 · 5 revisions

Installation and Setup

  • Go to the Modelworks GitHub repository (linked here)
  • Under /api/, download main.py (linked here) onto your local device
  • (from here, instructions may vary)
    • PERSONAL VERSION
      • Open WSL
      • Create a python environment (if you haven't already): python -m venv venv
      • Open your python environment (using the source venv command)
        • (keep in mind that you might need to run pip install openai in your environment)
      • Run main.py
      • You should now be able to talk to JoeyLLM!
    • DEPLOYABLE VERSION
      • Find a suitable repository (e.g. /app/api/chat/)
      • Create (or adjust) a route.ts file based on the main.py file you downloaded
      • Link the file to your program somehow (depending on how you will implement it)
        • In the context of NextJS (more information found here), the route.ts file was linked in the following way under app/page.tsx:

          image

Customisation

  • JoeyLLM can be properly integrated into your pre-existing product through appropriate prompt engineering.
    • You can do this by going to its linked file (route.ts, for instance), and either creating or visiting the appropriate functions.
      • Below is an example regarding haiku creation:
    // Construct the haiku generation prompt
    const haikuPrompt = `Write a haiku (5-7-5 syllable pattern) based on this prompt: "${prompt}". 

Please only respond with the haiku, with appropriate line breaks between each line.  Do not add in any commentary about it, including the line number or syllable count.

Please ensure that there are three lines, one with 5 syllables, another with 7 syllables, and one with 5 syllables again (all in that order).

At least once, add a random exclamation that is Australian slang or a cultural reference at the end of a line in parentheses (e.g. "Roses are red (crikey!)").  Do not swear.`;

    // Create a focused conversation for haiku generation
    const messages = [
      { role: "system" as const, content: "You are an expert at writing eloquent and poetic 3-line haikus that strictly follow the 5-7-5 syllable pattern. You also talk like a stereotypical Australian." },
      { role: "user" as const, content: haikuPrompt }
    ];

Tips and Tricks

  • Again, issues may arise depending on what device you are working on. In that case, please communicate with Modelworks team members, or seek out sources on the internet.
  • Furthermore, AI usage (such as Claude.ai) is allowed for any necessary troubleshooting.

Clone this wiki locally