Ctx-opt: TypeScript middleware to trim LLM chats to a token budgetctx-opt은 TypeScript로 작성된 LLM 채팅 메시지 토큰 예산 내 최적화 미들웨어로, 메시지 배열을 토큰 제한에 맞게 자르거나 압축하여 반환합니다. OpenAI, Anthropic 등 다양한 SDK와 호환되며, 슬라이딩 윈도우, 요약, 관련도 평가, 하이브리드 등 여러 전략을 지원해 비용과 품질을 조절할 수 있습니다. 내장된 BM25 및 임베딩 기반 스코어러를 제공하며, 토큰 절감에 따른 비용 절감 메타데이터도 제공합니다. 브라우저와 Node.js 환경 모두에서 사용 가능하며, LLM 호출을 직접 플러그인하는 구조로 설계되어 유연성을 높였습니다.https://github.com/EvanPaules/ctx-opt#typescript #llm #middleware #tokenoptimization #openai
Related
New AI models can now work with text, images, and sound, unlike older models that only used text. This is a big step for...
New AI models can now work with text, images, and sound, unlike older models that only used text. This is a big step forward.#AI, #LLM, #TechNews, #Innovation, #MultimodalAIhttps:/...
The Movie That Changed Cybersecurity: A Tech Focused Look At WarGames If you work in cybersecurity or artificial intelli...
The Movie That Changed Cybersecurity: A Tech Focused Look At WarGames If you work in cybersecurity or artificial intelligence today, you have likely suffered through your fair shar...
Even at a so-called "elite" institution like Princeton, 30% of students are using #AI to cheat: https://arstechnica.com/...
Even at a so-called "elite" institution like Princeton, 30% of students are using #AI to cheat: https://arstechnica.com/tech-policy/2026/05/ai-driven-cheating-widespread-even-at-el...