Extension Chat


Extension Basics

Title
Chat
Name
ckanext-chat
Type
Public extension
Description
Configurable Chat Interface for CKAN
CKAN versions
Download-Url (zip)
Last commit
6 months ago (2025-07-15 08:50:04)
Url to repo
Category
Cloud Infrastructure & Storage


Background Infos

Description (long)
Show details

ckanext-chat

Tests

A plugin integrating a chat interface in ckan with a pydanticai agent that can use all available ckan actions and url_patterns. All actions are done with user aware context. The chat interface uses marked and highightjs to display responses. Chat histories are saved in the local storage of the user. The agent is chat history aware. LLMs to use are configured in the bot/agent.py a section Model & Agent Setup. An Azure Openai and a local impementation using openai compartible api of ollama is implemeneted.

Option Rag Search

It has a rag_search tool that can facilitate a Milvus vector store if it is set up. Currently it relies on the Azure OpenAI embeddings api and will not work with local deployments. It uses the embedding model text-embedding-3-small to form the search vector. To make use of the documents it returns, the metadata of te vectores should include the dataset and resource ids at least. See the class VectorMeta for expected fields.

chat example

LLM Compartibility

Openai Models starting from gpt-35 on work very well. Local LLMs tested with ollama server are listed below.

LLM Compatible?
qwen2.5:32b works, but some wierd output
llama3.3:70B works not so well, reluctant to run actions right away
gemma3 not working, no tool support
phi4 not working, no tool support
qwq to much thinking, not enogh action
mistal:7B When Using OpenAI interface of Ollama no good tool integration

in general reasoning models dont perform well

Requirements

A completion endpoint of the LLM model to use with the agent is needed. Currently uses Azure Cognitive Service Integrati

Version
0.1.6-alpha
Version release date
2025-07-15
Contact name
(not set)
Contakt email
(not set)
Contact Url
(not set)


Installation Guide

Configuration hints

To install the extension:

  1. Activate your CKAN virtual environment, for example:
. /usr/lib/ckan/default/bin/activate
  1. Use pip to install package
pip install ckanext-chat
  1. Add csvtocsvw to the ckan.plugins setting in your CKAN    config file (by default the config file is located at    /etc/ckan/default/ckan.ini).

  2. Restart CKAN. For example, if you’ve deployed CKAN with Apache on Ubuntu:

sudo service apache2 reload
Plugins to configure (ckan.ini)
chat
CKAN Settings (ckan.ini)
# ckanext.chat.completion_url="https://your-subscription.openai.azure.com/"
# ckanext.chat.deployment="gpt-4o"
# ckanext.chat.api_token="your-api-token"
# ckanext.chat.embedding_mode=<embedding model name to request from the embedding api>
# ckanext.chat.embedding_api=<api endpoint to send text to and to return an embeding>
# ckanext.chat.milvus_url=<url to milvus server>
# ckanext.chat.collection_name=<name of milvus collection
DB migration to be executed
(not set)
<< back to Extensions