-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add HTTP models for BrainForge service endpoints
- Loading branch information
1 parent
038cd25
commit c194037
Showing
2 changed files
with
20 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
from typing import List | ||
from typing import List, Optional | ||
from pydantic import Field | ||
|
||
from neon_data_models.models.base import BaseModel | ||
from neon_data_models.models.api.llm import BrainForgeLLM | ||
from neon_data_models.models.api.llm import BrainForgeLLM, LLMPersona, LLMRequest | ||
|
||
|
||
class LLMGetModelsHttpResponse(BaseModel): | ||
models: List[BrainForgeLLM] | ||
|
||
|
||
class LLMGetPersonasHttpRequest(BaseModel): | ||
model_id: str = Field( | ||
description="Model ID (<name>@<version>) to get personas for") | ||
|
||
|
||
class LLMGetPersonasHttpResponse(BaseModel): | ||
personas: List[LLMPersona] = Field( | ||
description="List of personas associated with the requested model.") | ||
|
||
|
||
class LLMGetInferenceHttpRequest(LLMRequest): | ||
llm_name: str = Field(description="Model name to request") | ||
llm_revision: str = Field(description="Model revision to request") | ||
model: Optional[str] = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters