mirror of
https://github.com/StanGirard/quivr.git
synced 2024-11-24 05:55:13 +03:00
16 lines
380 B
Python
16 lines
380 B
Python
from typing import Optional
|
|
from uuid import UUID
|
|
|
|
from repository.brain import get_brain_prompt_id
|
|
|
|
|
|
def get_prompt_to_use_id(
|
|
brain_id: Optional[UUID], prompt_id: Optional[UUID]
|
|
) -> Optional[UUID]:
|
|
if brain_id is None and prompt_id is None:
|
|
return None
|
|
|
|
return (
|
|
prompt_id if prompt_id else get_brain_prompt_id(brain_id) if brain_id else None
|
|
)
|