-
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.
Merge pull request #1 from mobiusml/improved_structure
Project Structure Improvement
- Loading branch information
Showing
19 changed files
with
168 additions
and
5 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
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
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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
deployments: list[dict] = [] | ||
|
||
# Add deployments for models that you want to deploy here. | ||
# | ||
# For example: | ||
# from aana.deployments.whisper_deployment import ( | ||
# WhisperComputeType, | ||
# WhisperConfig, | ||
# WhisperDeployment, | ||
# WhisperModelSize, | ||
# ) | ||
# asr_deployment = WhisperDeployment.options( | ||
# num_replicas=1, | ||
# ray_actor_options={"num_gpus": 0.1}, | ||
# user_config=WhisperConfig( | ||
# model_size=WhisperModelSize.MEDIUM, | ||
# compute_type=WhisperComputeType.FLOAT16, | ||
# ).model_dump(mode="json"), | ||
# ) | ||
# deployments.append({"name": "asr_deployment", "instance": asr_deployment}) | ||
# | ||
# You can use predefined deployments from the Aana SDK or create your own. | ||
# See https://github.com/mobiusml/aana_sdk/blob/main/docs/integrations.md for the list of predefined deployments. | ||
# | ||
# If you want to create your own deployment, put your deployment classes in a separate files in the `deployments` directory and import them here. |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
endpoints: list[dict] = [] | ||
|
||
# Add your endpoints here. | ||
# | ||
# For example: | ||
# endpoints.append( | ||
# { | ||
# "name": "predict", | ||
# "path": "/predict", | ||
# "summary": "Predict the class of an image.", | ||
# "endpoint_cls": PredictEndpoint, | ||
# } | ||
# ) | ||
# | ||
# Endpoints can be created by inheriting from the `Endpoint` class. | ||
# Put your endpoint classes in a separate files in the `endpoints` directory and import them here. | ||
# See https://github.com/mobiusml/aana_sdk/tree/main?tab=readme-ov-file#endpoints in how to create endpoints. |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from aana.configs.settings import Settings as AanaSettings | ||
|
||
|
||
class Settings(AanaSettings): | ||
"""A pydantic model for App settings.""" | ||
# Add your custom settings here | ||
# Then, you can access them in your app like this: | ||
# from aana_app_project.configs.settings import settings | ||
# settings.custom_property | ||
pass | ||
|
||
|
||
settings = Settings() |
File renamed without changes.
Empty file.
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from jinja2 import Environment, PackageLoader, Template | ||
|
||
|
||
def get_prompt_template(name: str) -> Template: | ||
"""Load a prompt template by name. | ||
Use this function to load a prompt templates for LLMs: | ||
```python | ||
from aana_app_project.core.prompts.loader import get_prompt_template | ||
template = get_prompt_template("test") | ||
prompt = template.render(your_variable="your_value") | ||
``` | ||
Args: | ||
name (str): The name of the prompt template. | ||
Returns: | ||
Template: The prompt template. | ||
""" | ||
env = Environment(loader=PackageLoader( | ||
"aana_app_project", "core", "prompts")) | ||
template = env.get_template(f"{name}.j2") | ||
return template |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
Define your prompts for LLMs here. Use jinja2 templating to include variables like {{ your_variable }}. |
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
Empty file.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
from aana.exceptions.core import BaseException |
Empty file.
Empty file.
Empty file.