Codemod from llama_toolchain -> llama_stack

- added providers/registry
- cleaned up api/ subdirectories and moved impls away
- restructured api/api.py
- from llama_stack.apis.<api> import foo should work now
- update imports to do llama_stack.apis.<api>
- update many other imports
- added __init__, fixed some registry imports
- updated registry imports
- create_agentic_system -> create_agent
- AgenticSystem -> Agent
This commit is contained in:
Ashwin Bharambe 2024-09-16 17:34:07 -07:00
parent 2cf731faea
commit 76b354a081
128 changed files with 381 additions and 376 deletions

View file

@ -7,7 +7,7 @@
from abc import ABC, abstractmethod
from typing import List
from llama_stack.inference.api import Message
from llama_stack.apis.inference import Message
class BaseTool(ABC):

View file

@ -21,8 +21,8 @@ from .ipython_tool.code_execution import (
TOOLS_ATTACHMENT_KEY_REGEX,
)
from llama_stack.inference.api import * # noqa: F403
from llama_stack.agentic_system.api import * # noqa: F403
from llama_stack.apis.inference import * # noqa: F403
from llama_stack.apis.agents import * # noqa: F403
from .base import BaseTool

View file

@ -10,7 +10,7 @@ from abc import abstractmethod
from typing import Dict, List
from llama_models.llama3.api.datatypes import * # noqa: F403
from llama_stack.agentic_system.api import * # noqa: F403
from llama_stack.apis.agents import * # noqa: F403
class CustomTool:

View file

@ -6,10 +6,10 @@
from typing import List
from llama_stack.agentic_system.meta_reference.safety import ShieldRunnerMixin
from llama_stack.apis.inference import Message
from llama_stack.apis.safety import Safety, ShieldDefinition
from llama_stack.inference.api import Message
from llama_stack.safety.api import Safety, ShieldDefinition
from llama_stack.providers.impls.meta_reference.agents.safety import ShieldRunnerMixin
from .builtin import BaseTool