Cut context

function

a filter to cut the context of historical conversation turns (Support for head and tail cutting)

grayxu
@grayxu
·
2 years ago
330
0
1.3K
Updated 2 years ago
Created Aug 1, 2024
cut_context.py
Python · 72 lines
"""
title: Cut the context of historical conversation turns

author: GrayXu
author_url: https://github.com/GrayXu
funding_url: https://github.com/GrayXu/openwebui-cut-context
version: 0.1.1
"""

from pydantic import BaseModel, Field
from typing import Optional

a filter to cut the context of historical conversation turns (Support for head and tail cutting)


0