-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AIC-py][editor] add default model parsers file (#567)
[AIC-py][editor] add default model parsers file --- Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/lastmile-ai/aiconfig/pull/567). * #573 * __->__ #567
- Loading branch information
Showing
2 changed files
with
83 additions
and
42 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
python/src/aiconfig/editor/example_aiconfig_model_registry.py
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,21 @@ | ||
""" | ||
Use this file to register model parsers that don't ship with aiconfig. | ||
- Make sure your package is installed in the same environment as aiconfig. | ||
- You must define a function `register_model_parsers() -> None` in this file. | ||
- You should call `AIConfigRuntime.register_model_parser` in that function. | ||
See example below. | ||
""" | ||
|
||
|
||
# from aiconfig import AIConfigRuntime | ||
# from llama import LlamaModelParser | ||
|
||
|
||
def register_model_parsers() -> None: | ||
# Example: | ||
# model_path = "/path/to/my/local/llama/model" | ||
# llama_model_parser = LlamaModelParser(model_path) | ||
# AIConfigRuntime.register_model_parser(llama_model_parser, "llama-2-7b-chat") | ||
# You can remove this `pass` once your function is implemented (see above). | ||
pass |
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