Skip to content

summarization

Description

Note

More information about the service specification can be found in the Core concepts > Service documentation.

This service uses langchain and LLMs to create summaries of documents. The technique used for the summarization is the Map/reduce technique showed by langchain. Each document will be summarized individually (Mapping phase) and then all the summaries will be combined into a single summary (Reduce phase).

The LLMs used by this service are hosted by Ollama.

Environment variables

Check the Core concepts > Service > Environment variables documentation for more details.

Run the tests with Python

Check the Core concepts > Service > Run the tests with Python documentation for more details.

Start the service locally

Check the Core concepts > Service > Start the service locally documentation for more details.

Deploy ollama locally

add the following container to the stateful.yml deployment file

- name: ollama
image: ollama/ollama
ports:
- name: http
    containerPort: 11434
command: ["/bin/bash", "-c"]
args:
- |
    ollama serve &
    sleep 10
    ollama pull mistral:instruct
    sleep infinity
resources:
    requests:
    tencent.com/vcuda-core: 20
    tencent.com/vcuda-memory: 8
    limits:
    tencent.com/vcuda-core: 20
    tencent.com/vcuda-memory: 8