From e5bd88048dab3bee8a820a4bbf662ef8e73cde73 Mon Sep 17 00:00:00 2001 From: scosman Date: Sun, 16 Feb 2025 10:17:34 -0500 Subject: [PATCH] Fix python 3.10 issue, and update cursor rules with 3.10+ --- .cursorrules | 1 + libs/core/kiln_ai/adapters/prompt_builders.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.cursorrules b/.cursorrules index 32d21fb8..458a4bd8 100644 --- a/.cursorrules +++ b/.cursorrules @@ -1,3 +1,4 @@ - Always assume pydantic 2 (not pydantic 1) - Always use pytest for tests + - The project supports Python 3.10 and above diff --git a/libs/core/kiln_ai/adapters/prompt_builders.py b/libs/core/kiln_ai/adapters/prompt_builders.py index 9402d3d6..749311fe 100644 --- a/libs/core/kiln_ai/adapters/prompt_builders.py +++ b/libs/core/kiln_ai/adapters/prompt_builders.py @@ -1,6 +1,6 @@ import json from abc import ABCMeta, abstractmethod -from enum import StrEnum +from enum import Enum from typing import Annotated, Dict from pydantic import AfterValidator @@ -397,7 +397,7 @@ def chain_of_thought_prompt(self) -> str | None: # Generators that can take any task and build a prompt -class PromptGenerators(StrEnum): +class PromptGenerators(str, Enum): SIMPLE = "simple_prompt_builder" MULTI_SHOT = "multi_shot_prompt_builder" FEW_SHOT = "few_shot_prompt_builder"