Skip to main content
Version: Next

Without ALO-LLM Framework

Updated 2025.08.26

This document guides you through developing a service API in your local environment without using the ALO-LLM framework.

Developing an API in a Local Environment

If you are not using ALO-LLM, there are no special restrictions. However, you must write the installation commands in the prerequisite_install.sh file and write the description and entry_point in the config.yaml file.

Prerequisites

  • It is recommended to use Python 3.12.x.
  • It is recommended to use VS Code. If you use Mobaxterm, errors may occur when using Korean in code and comments.
  • Even if you do not use the ALO-LLM features, you must install ALO-LLM to use the CLI commands.

LLM logic developers can develop a Service API in a local environment by following these two steps.

Step 1: Write LLM Logic Code

Users can develop code according to their desired purpose. If you are not using ALO-LLM, there are no major restrictions. After checking that the code works correctly, you only need to set up the config.yaml and prerequisite_install.sh files.

Step 2: Create config.yaml file

Install ALO-LLM. After installation, enter the AI Logic Deployer address and description in the config.yaml file.


Step 1: Write LLM logic code

Users can write code that suits their purpose without any special restrictions. However, you must create prerequisite_install.sh.

Code Example)

main.py


from fastapi import FastAPI, Response
from fastapi.routing import APIRouter
import os
router = APIRouter()

@router.get("/echo_message") # for base path
def echo_message(path: str = ""):
try:
with open("message.txt", "r") as f:
message = f.read()
return Response(content=message, media_type="text/plain")
except Exception as e:
return Response(content=f"Error reading message: {e}", status_code=500)

app = FastAPI(
root_path="/" + os.getenv("AIPACK_NAME", "")
)

app.include_router(router)

message.txt

HELLO

prerequisite_install.sh


Caution

  • prerequisite_install.sh lists the commands to install the libraries required for the written code.
pip install uvicorn
pip install fastapi

Step 2: Create config.yaml file

User-created files for running ALO-LLM

After installing the ALO-LLM package, the config.yaml file must be in the working path. The Service API is built based on the FastAPI framework. The input format of each API must be specified, and the URI must be clearly defined. ALO-LLM automatically generates the API based on these regulations.

2-1. Install ALO-LLM with the pip command

  • Install with the pip install command pip install mellerikat-alm

Caution

  • When registering via the ALO-LLM CLI, all folders and files in the current location are compressed and registered.

2-2. Create config.yaml

  • Create the yaml based on your logic code.

Caution

  • The content of the Agent Name, Developer, and Documents in the description can be empty, but the keys must exist.
  • The Codes in the description is a required field. (code git address)
name: survey_analysis
version: 1.0.0
entry_point: uvicorn main:app --host 0.0.0.0 --port 80
overview: A framework that easily converts Python code to FastAPI and deploys it to a production environment.
description:
Agent: ALO-LLM #
Developer: C, Y #
Documents: http://collab.lge.com/main/pages/viewpage.action?pageId=3035388304 #
Codes: http://mod.lge.com/hub/llmops-aibigdata/llo/llo-dev/-/tree/v1.0.2?ref_type=heads #
version: v1.2.0
etc: etc...
setting:
ai_logic_deployer_url: "https://ald.llm-dev.try-mellerikat.com"
  • name: This field specifies the name of the service API. Here it is named simple_chatbot.
  • version: Sets the version of the service API. The current version is 1.0.0.
  • entry_point: This is the command that the user will execute. If you are using ALO-LLM, use 'alm api'. Otherwise, you can use a custom command. You can write multiple commands separated by &&.
  • overview: Write a general description of the service API.
  • description: Write a detailed description of the registered service API. It is written in key: value format. The top 4 (Agent Name, Developer, Documents, Codes) are required, and the rest can be added/deleted by the user.
  • setting: Represents the settings for service configuration.
  • ai_logic_deployer_uri: Enter the address of the AI Logic Deployer to proceed with registration and deployment.

Once this is complete, you can proceed to the next page.