import os import warnings from datetime import datetime from enum import Enum from typing import Any, Dict, List, Optional, Tuple, Union from uuid import UUID from langchain_core.agents import AgentAction, AgentFinish from langchain_core.callbacks import BaseCallbackHandler from langchain_core.messages import BaseMessage, ChatMessage from langchain_core.outputs import Generation, LLMResult class LabelStudioMode(Enum): """Label Studio mode enumerator.""" PROMPT = "prompt" CHAT = "chat" def get_default_label_configs( mode: Union[str, LabelStudioMode], ) -> Tuple[str, LabelStudioMode]: """Get default Label Studio configs for the given mode. Parameters: mode: Label Studio mode ("prompt" or "chat") Returns: Tuple of Label Studio config and mode """ _default_label_configs = { LabelStudioMode.PROMPT.value: """