mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-17 19:02:37 +00:00
resolve conflict
This commit is contained in:
commit
99004b6df8
91 changed files with 3734 additions and 730 deletions
|
|
@ -11,7 +11,7 @@ from typing import Optional
|
|||
from llama_stack_client import LlamaStackClient
|
||||
|
||||
|
||||
class LlamaStackEvaluation:
|
||||
class LlamaStackApi:
|
||||
def __init__(self):
|
||||
self.client = LlamaStackClient(
|
||||
base_url=os.environ.get("LLAMA_STACK_ENDPOINT", "http://localhost:5000"),
|
||||
|
|
@ -23,14 +23,6 @@ class LlamaStackEvaluation:
|
|||
},
|
||||
)
|
||||
|
||||
def list_scoring_functions(self):
|
||||
"""List all available scoring functions"""
|
||||
return self.client.scoring_functions.list()
|
||||
|
||||
def list_models(self):
|
||||
"""List all available judge models"""
|
||||
return self.client.models.list()
|
||||
|
||||
def run_scoring(
|
||||
self, row, scoring_function_ids: list[str], scoring_params: Optional[dict]
|
||||
):
|
||||
|
|
@ -40,3 +32,6 @@ class LlamaStackEvaluation:
|
|||
return self.client.scoring.score(
|
||||
input_rows=[row], scoring_functions=scoring_params
|
||||
)
|
||||
|
||||
|
||||
llama_stack_api = LlamaStackApi()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue