https://github.com/cr1337/xllama
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.3%) to scientific vocabulary
Repository
Basic Info
Statistics
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
xLLaMa
Abstract
When working with an unfamiliar API or framework, the absence of meaningful code examples within the documentation can pose a significant challenge. Turning to AI and chatbots for assistance in this situation, quickly becomes repetitive and inefficient, particularly when dealing with lesser-known APIs requiring additional documentation for each function.
To address this dilemma, we present xLLaMa, a user-friendly web interface designed to streamline the generation of code examples across multiple APIs. xLLaMa simplifies the process by eliminating the need for manual prompts to an LLM. Instead, users can simply select an API and their corresponding functions from a dropdown menu before an example is generated by multiple LLMs simultaneously. If the generated example includes other functions from the API, users can easily select them within the code snippet to generate additional examples. Moreover, users can request explanations of the code or more detailed variations of the example with the click of a button. Additional features include direct links to API documentation for each function and a history of previously generated examples.
Users have responded positively to the tool, noting its potential to improve their workflow when working with a new API. They also appreciate the convenience of having all frameworks and features collected in one easily accessible platform.
Further information can be found here.
How to use
🔎 Select the API and function you want to generate an example for.
💡 You can click into the example code to generate further examples
Setup instructions can be found here.
The web interface of xLLaMa is intuitively structured to match a user's workflow by going from the top to the bottom. In order to generate an example, users first select their preferred API or framework. From there they can choose a function, either by selecting one of the suggested functions or by picking it from the dropdown menu. Once a function has been selected, users can generate their example right away. The generation process takes place simultaneously with multiple LLMs, offering a broader range of choices.
If users encounter any difficulties understanding the code, they can have it explained to them or open the API documentation for further technical details. Within the example code, various other functions are highlighted and can be selected in order to generate further examples.
Users can request a longer or shorter version of the code example by pressing one of the buttons below. The generated code can also be copied to the clipboard by pressing the button located in the top left-hand corner. Once users have finished with a particular code snippet, they can close this example and proceed with their work.
A demonstration video can be found here.
Repository Structure
Directory|Description -|- /bin|This directory contains some utility scripts to manage the application. /doc|Here are some miscellaneous documents. /services|This directory contains alle the docker services. /services/codeanalyzer|A service that can find, analyze and highlight python code. See here. /services/db|A postgres database. /services/dbinterface|A REST interface for interacting with the database. See here /services/frontend|This services runs a node server that hosts the frontend. /services/llmfacade|A Service that acts as a facade between the application and other services that provide predictions by LLMs (Specifically Ollama and OpenAI). See here. /services/llmfacadenginx|An nginx server in front of the llmfacade service. /services/ollama|A service that makes installing and running LLMs locally easy. /volumes|Here are the persistant volumes of the docker services.
Architecture
Component Diagrams
Frontend

Backend

Sequence Diagrams
The following sequnce diagram shows what happens during an example generation.

Setup
Installation
1. Install Docker
See Docker Installation (if not already installed)
2. Install Python 3
Install at least Python 3.10 with Pip (if not already installed). Earlier versions might work but are not tested.
3. Clone this Repository
bash
git clone https://github.com/CR1337/xLLaMa.git
4. Change into the Repository
bash
cd xLLaMa
5. Create a virtual environment (optional)
bash
python3 -m venv .venv
6. Activate the virtual environment (optional)
bash
source .venv/bin/activate
7. Run setup script
If you are on the production server with GPUs 2 and 3, run
bash
bin/setup
else run
bash
bin/setup-local
Usage
1. Run the application
For running in the background (recommended for production):
bash
bin/run
For seeing terminal output (recommended for development):
bash
bin/run-blocking
If you are not on the production server with GPUs 2 and 3 use
bash
bin/run-local
or
bash
bin/run-blocking-local
respectively.
2. Open the application
Open the application in a browser at http://localhost:8080. You can replace localhost with the IP of the server.
3. Stop the application
bash
bin/stop
or if you are not on the production server with GPUs 2 and 3
bash
bin/stop-local
Dependencies
Python Pip
- requests 2.31.0
- tqdm 4.66.0
- flask 3.0.0
- flask-cors 4.0.0
- gunicorn 21.2.0
- openai 1.3.4
- redis 5.0.1
- peewee 3.17.0
- pygments 2.17.2
Node
- vue 3.3.4
- primevue 3.44.0
- vue-markdown-renderer 2.1.1
- vue-router 4.2.5
- vue-toast-notification 3.1.2
Other
- docker
- docker-compose
Hardware Requirements
- Linux with 2 GPUS with ~32 GB VRAM each
Owner
- Name: Christian Raue
- Login: CR1337
- Kind: user
- Location: Berlin/Germany
- Website: https://www.linkedin.com/in/christian-raue-35591a196/
- Repositories: 3
- Profile: https://github.com/CR1337
Studying IT-Systems Engineering M.Sc. at Hasso-Plattner-Institute Potsdam
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Dependencies
- ollama/ollama latest
- postgres 12.1
- python 3.10-alpine build
- python 3.10-alpine build
- node current-slim build
- python 3.10-alpine build
- @esbuild/android-arm 0.18.20 development
- @esbuild/android-arm64 0.18.20 development
- @esbuild/android-x64 0.18.20 development
- @esbuild/darwin-arm64 0.18.20 development
- @esbuild/darwin-x64 0.18.20 development
- @esbuild/freebsd-arm64 0.18.20 development
- @esbuild/freebsd-x64 0.18.20 development
- @esbuild/linux-arm 0.18.20 development
- @esbuild/linux-arm64 0.18.20 development
- @esbuild/linux-ia32 0.18.20 development
- @esbuild/linux-loong64 0.18.20 development
- @esbuild/linux-mips64el 0.18.20 development
- @esbuild/linux-ppc64 0.18.20 development
- @esbuild/linux-riscv64 0.18.20 development
- @esbuild/linux-s390x 0.18.20 development
- @esbuild/linux-x64 0.18.20 development
- @esbuild/netbsd-x64 0.18.20 development
- @esbuild/openbsd-x64 0.18.20 development
- @esbuild/sunos-x64 0.18.20 development
- @esbuild/win32-arm64 0.18.20 development
- @esbuild/win32-ia32 0.18.20 development
- @esbuild/win32-x64 0.18.20 development
- @vitejs/plugin-vue 4.4.1 development
- esbuild 0.18.20 development
- fsevents 2.3.3 development
- rollup 3.29.4 development
- vite 4.5.0 development
- @babel/parser 7.23.3
- @jridgewell/sourcemap-codec 1.4.15
- @vue/compiler-core 3.3.8
- @vue/compiler-dom 3.3.8
- @vue/compiler-sfc 3.3.8
- @vue/compiler-ssr 3.3.8
- @vue/devtools-api 6.5.1
- @vue/reactivity 3.3.8
- @vue/reactivity-transform 3.3.8
- @vue/runtime-core 3.3.8
- @vue/runtime-dom 3.3.8
- @vue/server-renderer 3.3.8
- @vue/shared 3.3.8
- csstype 3.1.2
- estree-walker 2.0.2
- magic-string 0.30.5
- nanoid 3.3.7
- picocolors 1.0.0
- postcss 8.4.31
- primevue 3.44.0
- source-map-js 1.0.2
- vue 3.3.8
- vue-router 4.2.5
- @vitejs/plugin-vue ^4.4.0 development
- vite ^4.4.11 development
- primevue ^3.44.0
- vue ^3.3.4
- vue-router ^4.2.5
- certifi ==2023.11.17
- charset-normalizer ==3.3.2
- exceptiongroup ==1.2.0
- idna ==3.6
- iniconfig ==2.0.0
- packaging ==23.2
- pluggy ==1.3.0
- pytest ==7.4.3
- python-dotenv ==1.0.0
- requests ==2.31.0
- tomli ==2.0.1
- urllib3 ==2.1.0
- Flask ==3.0.0
- Flask-Cors ==4.0.0
- Jinja2 ==3.1.2
- MarkupSafe ==2.1.3
- Werkzeug ==3.0.1
- blinker ==1.7.0
- certifi ==2023.11.17
- charset-normalizer ==3.3.2
- click ==8.1.7
- colorama ==0.4.6
- idna ==3.6
- itsdangerous ==2.1.2
- mando ==0.7.1
- radon ==6.0.1
- requests ==2.31.0
- six ==1.16.0
- urllib3 ==2.1.0
- Flask ==3.0.0
- Flask-Cors ==4.0.0
- Jinja2 ==3.1.2
- MarkupSafe ==2.1.3
- Werkzeug ==3.0.1
- blinker ==1.7.0
- click ==8.1.7
- itsdangerous ==2.1.2
- peewee ==3.17.0
- psycopg2-binary ==2.9.9
- Flask ==3.0.0
- Flask-Cors ==4.0.0
- Jinja2 ==3.1.2
- MarkupSafe ==2.1.3
- Werkzeug ==3.0.1
- annotated-types ==0.6.0
- anyio ==3.7.1
- blinker ==1.7.0
- certifi ==2023.11.17
- charset-normalizer ==3.3.2
- click ==8.1.7
- distro ==1.8.0
- exceptiongroup ==1.2.0
- h11 ==0.14.0
- httpcore ==1.0.2
- httpx ==0.25.1
- idna ==3.4
- itsdangerous ==2.1.2
- openai ==1.3.4
- pydantic ==2.5.1
- pydantic_core ==2.14.3
- requests ==2.31.0
- sniffio ==1.3.0
- tqdm ==4.66.1
- typing_extensions ==4.8.0
- urllib3 ==2.1.0
- ollama/ollama latest
- postgres 12.1
- redis 5.0.7
- nginx 1.17.8-alpine build