Skip to content

String concatenation error when using local LLM with llama-cpp-python server #150

@shivam-saway

Description

@shivam-saway

When using LIDA with a local LLM hosted via llama-cpp-python server, I encounter a string concatenation error during the data summarization process. Despite this error, the summarization appears to work correctly and returns valid JSON output.

Environment
LIDA Version: [latest]
Local LLM: Microsoft Phi-3-mini-4k-instruct (GGUF format)
LLM Server: llama-cpp-python (ghcr.io/abetlen/llama-cpp-python:v0.3.5)
Setup: Docker Compose with OpenAI-compatible API endpoint

ERROR:

Error processing file: can only concatenate str (not "dict") to str
2025-09-27 15:01:48.891 | INFO:     Will watch for changes in these directories: ['/app']
2025-09-27 15:01:48.891 | INFO:     Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
2025-09-27 15:01:48.891 | INFO:     Started reloader process [1] using StatReload
2025-09-27 15:01:50.512 | INFO:     Started server process [29]
2025-09-27 15:01:50.512 | INFO:     Waiting for application startup.
2025-09-27 15:01:50.512 | INFO:     Application startup complete.
2025-09-27 15:09:34.747 | Error processing file: can only concatenate str (not "dict") to str
2025-09-27 15:08:22.880 | INFO:     172.18.0.1:39926 - "GET /api/models HTTP/1.1" 200 OK
2025-09-27 15:09:34.747 | <|assistant|> {
2025-09-27 15:09:34.747 |   "name": "mock_sales_data_2020_2021_limited.csv",
2025-09-27 15:09:34.747 |   "file_name": "mock_sales_data_2020_2021_limited.csv",
2025-09-27 15:09:34.747 |   "dataset_description": "",
2025-09-27 15:09:34.747 |   "fields": [
2025-09-27 15:09:34.747 |     {
2025-09-27 15:09:34.747 |       "column": "Year",
2025-09-27 15:09:34.747 |       "properties": {
2025-09-27 15:09:34.747 |         "dtype": "number",
2025-09-27 15:09:34.747 |         "std": 0,
2025-09-27 15:09:34.747 |         "min": 2020,
2025-09-27 15:09:34.747 |         "max": 2021,
2025-09-27 15:09:34.747 |         "samples": [2021, 2020],
2025-09-27 15:09:34.747 |         "num_unique_values": 2,
2025-09-27 15:09:34.747 |         "semantic_type": "",
2025-09-27 15:09:34.747 |         "description": ""
2025-09-27 15:09:34.747 |       }
2025-09-27 15:09:34.747 |     },
2025-09-27 15:09:34.747 |     {
2025-09-27 15:09:34.747 |       "column": "Date",
2025-09-27 15:09:34.747 |       "properties": {
2025-09-27 15:09:34.747 |         "dtype": "date",
2025-09-27 15:09:34.747 |         "min": "2020-01-01",
2025-09-27 15:09:34.747 |         "max": "2021-01-03",
2025-09-27 15:09:34.747 |         "samples": ["2020-01-01", "2020-01-02"],
2025-09-27 15:09:34.747 |         "num_unique_values": 6,
2025-09-27 15:09:34.747 |         "semantic_type": "",
2025-09-27 15:09:34.747 |         "description": ""
2025-09-27 15:09:34.747 |       }
2025-09-27 15:09:34.747 |     },
2025-09-27 15:09:34.747 |     {
2025-09-27 15:09:34.747 |       "column": "Category",
2025-09-27 15:09:34.747 |       "properties": {
2025-09-27 15:09:34.747 |         "dtype": "category",
2025-09-27 15:09:34.747 |         "samples": ["Electronics", "Clothing"],
2025-09-27 15:09:34.747 |         "num_unique_values": 6,
2025-09-27 15:09:34.747 |         "semantic_type": "",
2025-09-27 15:09:34.747 |         "description": ""
2025-09-27 15:09:34.747 |       }
2025-09-27 15:09:34.747 |     },
2025-09-27 15:09:34.747 |     {
2025-09-27 15:09:34.747 |       "column": "Segment",
2025-09-27 15:09:34.747 |       "properties": {
2025-09-27 15:09:34.747 |         "dtype": "category",
2025-09-27 15:09:34.747 |         "samples": ["Up Market", "Mid Market"],
2025-09-27 15:09:34.747 |         "num_unique_values": 3,
2025-09-27 15:09:34.747 |         "semantic_type": "",
2025-09-27 15:09:34.747 |         "description": ""
2025-09-27 15:09:34.747 |       }
2025-09-27 15:09:34.747 |     },
2025-09-27 15:09:34.747 |     {
2025-09-27 15:09:34.747 |       "column": "Sales_Count",
2025-09-27 15:09:34.747 |       "properties": {
2025-09-27 15:09:34.747 |         "dtype": "number",
2025-09-27 15:09:34.747 |         "std": 51,
2025-09-27 15:09:34.747 |         "min": 13,
2025-09-27 15:09:34.747 |         "max": 197,
2025-09-27 15:09:34.747 |         "samples": [17, 181],
2025-09-27 15:09:34.747 |         "num_unique_values": 78,
2025-09-27 15:09:34.747 |         "semantic_type": "",
2025-09-27 15:09:34.747 |         "description": ""
2025-09-27 15:09:34.747 |       }
2025-09-27 15:09:34.747 |     },
2025-09-27 15:09:34.747 |     {
2025-09-27 15:09:34.747 |       "column": "Sales_Amount",
2025-09-27 15:09:34.747 |       "properties": {
2025-09-27 15:09:34.747 |         "dtype": "number",
2025-09-27 15:09:34.747 |         "std": 14396.958068756981,
2025-09-27 15:09:34.747 |         "min": 1479.73,
2025-09-27 15:09:34.747 |         "max": 49023.57,
2025-09-27 15:09:34.747 |         "samples": [3096.54, 30281.98],
2025-09-27 15:09:34.747 |         "num_unique_values": 100,
2025-09-27 15:09:34.747 |         "semantic_type": "",
2025-09-27 15:09:34.747 |         "description": ""
2025-09-27 15:09:34.747 |       }
2025-09-27 15:09:34.747 |     }
2025-09-27 15:09:34.747 |   ]
2025-09-27 15:09:34.747 | }
2025-09-27 15:09:34.747 | INFO:     172.18.0.1:39926 - "POST /api/summarize HTTP/1.1" 200 OK
2025-09-27 15:09:34.749 | INFO:     172.18.0.1:60386 - "GET /api/docs HTTP/1.1" 200 OK
2025-09-27 15:09:34.749 | INFO:     172.18.0.1:39930 - "GET /api/models HTTP/1.1" 200 OK
2025-09-27 15:09:34.888 | INFO:     172.18.0.1:39930 - "GET /api/openapi.json HTTP/1.1" 200 OK
2025-09-27 15:09:38.587 | INFO:     172.18.0.1:39930 - "GET /api/models HTTP/1.1" 200 OK

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions