graphiti/core/prompts/models.py
Daniel Chalef 9cc9883e66
chore: Fix Typing Issues (#27)
* typing.Any and friends

* message

* chore: Import Message model in llm_client

* fix: 💄 mypy errors

* clean up mypy stuff

* mypy

* format

* mypy

* mypy

* mypy

---------

Co-authored-by: paulpaliychuk <pavlo.paliychuk.ca@gmail.com>
Co-authored-by: prestonrasmussen <prasmuss15@gmail.com>
2024-08-23 11:15:44 -04:00

15 lines
289 B
Python

from typing import Any, Callable, Protocol
from pydantic import BaseModel
class Message(BaseModel):
role: str
content: str
class PromptVersion(Protocol):
def __call__(self, context: dict[str, Any]) -> list[Message]: ...
PromptFunction = Callable[[dict[str, Any]], list[Message]]