forked from Archives/langchain
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
391 B
Python
12 lines
391 B
Python
"""Interface for selecting examples to include in prompts."""
|
|
from abc import ABC, abstractmethod
|
|
from typing import Dict, List
|
|
|
|
|
|
class BaseExampleSelector(ABC):
|
|
"""Interface for selecting examples to include in prompts."""
|
|
|
|
@abstractmethod
|
|
def select_examples(self, input_variables: Dict[str, str]) -> List[dict]:
|
|
"""Select which examples to use based on the inputs."""
|