mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-03 17:29:01 +00:00
inspect
This commit is contained in:
parent
a6091fa158
commit
b936503784
5 changed files with 67 additions and 26 deletions
|
@ -6,10 +6,14 @@
|
||||||
import logging
|
import logging
|
||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
from typing import Any
|
from typing import Any, Dict
|
||||||
|
|
||||||
from llama_stack.distribution.datatypes import * # noqa: F403
|
|
||||||
|
|
||||||
|
from llama_stack.distribution.datatypes import (
|
||||||
|
DistributionSpec,
|
||||||
|
LLAMA_STACK_RUN_CONFIG_VERSION,
|
||||||
|
Provider,
|
||||||
|
StackRunConfig,
|
||||||
|
)
|
||||||
from llama_stack.distribution.distribution import (
|
from llama_stack.distribution.distribution import (
|
||||||
builtin_automatically_routed_apis,
|
builtin_automatically_routed_apis,
|
||||||
get_provider_registry,
|
get_provider_registry,
|
||||||
|
@ -17,10 +21,7 @@ from llama_stack.distribution.distribution import (
|
||||||
from llama_stack.distribution.utils.dynamic import instantiate_class_type
|
from llama_stack.distribution.utils.dynamic import instantiate_class_type
|
||||||
from llama_stack.distribution.utils.prompt_for_config import prompt_for_config
|
from llama_stack.distribution.utils.prompt_for_config import prompt_for_config
|
||||||
|
|
||||||
|
from llama_stack.providers.datatypes import Api, ProviderSpec
|
||||||
from llama_stack.apis.models import * # noqa: F403
|
|
||||||
from llama_stack.apis.shields import * # noqa: F403
|
|
||||||
from llama_stack.apis.memory_banks import * # noqa: F403
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,13 @@
|
||||||
# the root directory of this source tree.
|
# the root directory of this source tree.
|
||||||
|
|
||||||
from typing import Dict, List
|
from typing import Dict, List
|
||||||
from llama_stack.apis.inspect import * # noqa: F403
|
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
|
from llama_stack.apis.inspect import Inspect
|
||||||
|
from llama_stack.distribution.datatypes import HealthInfo, ProviderInfo, RouteInfo
|
||||||
from llama_stack.distribution.server.endpoints import get_all_api_endpoints
|
from llama_stack.distribution.server.endpoints import get_all_api_endpoints
|
||||||
from llama_stack.providers.datatypes import * # noqa: F403
|
from llama_stack.providers.datatypes import StackRunConfig
|
||||||
from llama_stack.distribution.datatypes import * # noqa: F403
|
|
||||||
|
|
||||||
|
|
||||||
class DistributionInspectConfig(BaseModel):
|
class DistributionInspectConfig(BaseModel):
|
||||||
|
|
|
@ -6,14 +6,10 @@
|
||||||
import importlib
|
import importlib
|
||||||
import inspect
|
import inspect
|
||||||
|
|
||||||
from typing import Any, Dict, List, Set
|
|
||||||
|
|
||||||
|
|
||||||
from llama_stack.providers.datatypes import * # noqa: F403
|
|
||||||
from llama_stack.distribution.datatypes import * # noqa: F403
|
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from typing import Any, Dict, List, Set
|
||||||
|
|
||||||
from llama_stack.apis.agents import Agents
|
from llama_stack.apis.agents import Agents
|
||||||
from llama_stack.apis.datasetio import DatasetIO
|
from llama_stack.apis.datasetio import DatasetIO
|
||||||
from llama_stack.apis.datasets import Datasets
|
from llama_stack.apis.datasets import Datasets
|
||||||
|
@ -32,10 +28,32 @@ from llama_stack.apis.shields import Shields
|
||||||
from llama_stack.apis.telemetry import Telemetry
|
from llama_stack.apis.telemetry import Telemetry
|
||||||
from llama_stack.apis.tools import ToolGroups, ToolRuntime
|
from llama_stack.apis.tools import ToolGroups, ToolRuntime
|
||||||
from llama_stack.distribution.client import get_client_impl
|
from llama_stack.distribution.client import get_client_impl
|
||||||
|
|
||||||
|
from llama_stack.distribution.datatypes import (
|
||||||
|
AutoRoutedProviderSpec,
|
||||||
|
DatasetsProtocolPrivate,
|
||||||
|
EvalTasksProtocolPrivate,
|
||||||
|
MemoryBanksProtocolPrivate,
|
||||||
|
ModelsProtocolPrivate,
|
||||||
|
Provider,
|
||||||
|
RoutingTableProviderSpec,
|
||||||
|
ScoringFunctionsProtocolPrivate,
|
||||||
|
ShieldsProtocolPrivate,
|
||||||
|
StackRunConfig,
|
||||||
|
ToolsProtocolPrivate,
|
||||||
|
)
|
||||||
from llama_stack.distribution.distribution import builtin_automatically_routed_apis
|
from llama_stack.distribution.distribution import builtin_automatically_routed_apis
|
||||||
from llama_stack.distribution.store import DistributionRegistry
|
from llama_stack.distribution.store import DistributionRegistry
|
||||||
from llama_stack.distribution.utils.dynamic import instantiate_class_type
|
from llama_stack.distribution.utils.dynamic import instantiate_class_type
|
||||||
|
|
||||||
|
from llama_stack.providers.datatypes import (
|
||||||
|
Api,
|
||||||
|
InlineProviderSpec,
|
||||||
|
ProviderSpec,
|
||||||
|
RemoteProviderConfig,
|
||||||
|
RemoteProviderSpec,
|
||||||
|
)
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,16 +6,39 @@
|
||||||
|
|
||||||
from typing import Any, AsyncGenerator, Dict, List, Optional
|
from typing import Any, AsyncGenerator, Dict, List, Optional
|
||||||
|
|
||||||
from llama_stack.apis.datasetio import * # noqa: F403
|
from llama_stack.apis.common.content_types import InterleavedContent
|
||||||
from llama_stack.apis.datasetio.datasetio import DatasetIO
|
from llama_stack.apis.datasetio import DatasetIO, PaginatedRowsResult
|
||||||
from llama_stack.apis.eval import * # noqa: F403
|
from llama_stack.apis.eval import (
|
||||||
from llama_stack.apis.inference import * # noqa: F403
|
AppEvalTaskConfig,
|
||||||
from llama_stack.apis.memory import * # noqa: F403
|
Eval,
|
||||||
|
EvalTaskConfig,
|
||||||
|
EvaluateResponse,
|
||||||
|
Job,
|
||||||
|
JobStatus,
|
||||||
|
)
|
||||||
|
from llama_stack.apis.inference import (
|
||||||
|
EmbeddingsResponse,
|
||||||
|
Inference,
|
||||||
|
LogProbConfig,
|
||||||
|
Message,
|
||||||
|
ResponseFormat,
|
||||||
|
SamplingParams,
|
||||||
|
ToolChoice,
|
||||||
|
ToolDefinition,
|
||||||
|
ToolPromptFormat,
|
||||||
|
)
|
||||||
|
from llama_stack.apis.memory import Memory, MemoryBankDocument, QueryDocumentsResponse
|
||||||
from llama_stack.apis.memory_banks.memory_banks import BankParams
|
from llama_stack.apis.memory_banks.memory_banks import BankParams
|
||||||
from llama_stack.apis.safety import * # noqa: F403
|
|
||||||
from llama_stack.apis.scoring import * # noqa: F403
|
|
||||||
from llama_stack.apis.tools import * # noqa: F403
|
|
||||||
from llama_stack.apis.models import ModelType
|
from llama_stack.apis.models import ModelType
|
||||||
|
from llama_stack.apis.safety import RunShieldResponse, Safety
|
||||||
|
from llama_stack.apis.scoring import (
|
||||||
|
ScoreBatchResponse,
|
||||||
|
ScoreResponse,
|
||||||
|
Scoring,
|
||||||
|
ScoringFnParams,
|
||||||
|
)
|
||||||
|
from llama_stack.apis.shields import Shield
|
||||||
|
from llama_stack.apis.tools import Tool, ToolGroupDef, ToolRuntime
|
||||||
from llama_stack.providers.datatypes import RoutingTable
|
from llama_stack.providers.datatypes import RoutingTable
|
||||||
|
|
||||||
|
|
||||||
|
@ -331,7 +354,6 @@ class EvalRouter(Eval):
|
||||||
task_config=task_config,
|
task_config=task_config,
|
||||||
)
|
)
|
||||||
|
|
||||||
@webmethod(route="/eval/evaluate_rows", method="POST")
|
|
||||||
async def evaluate_rows(
|
async def evaluate_rows(
|
||||||
self,
|
self,
|
||||||
task_id: str,
|
task_id: str,
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
from typing import Any, Dict, List, Optional
|
from typing import Any, Dict, List, Optional
|
||||||
|
|
||||||
# from llama_models.llama3.api.datatypes import * # noqa: F403
|
|
||||||
from pydantic import parse_obj_as
|
from pydantic import parse_obj_as
|
||||||
|
|
||||||
from llama_stack.apis.common.content_types import URL
|
from llama_stack.apis.common.content_types import URL
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue