mirror of
https://github.com/meta-llama/llama-stack.git
synced 2026-01-02 18:40:01 +00:00
Update Strategy in SamplingParams to be a union
This commit is contained in:
parent
300e6e2702
commit
dea575c994
28 changed files with 600 additions and 377 deletions
|
|
@ -22,7 +22,12 @@ from llama_stack.apis.agents import (
|
|||
ToolExecutionStep,
|
||||
Turn,
|
||||
)
|
||||
from llama_stack.apis.inference import CompletionMessage, SamplingParams, UserMessage
|
||||
from llama_stack.apis.inference import (
|
||||
CompletionMessage,
|
||||
SamplingParams,
|
||||
TopPSamplingStrategy,
|
||||
UserMessage,
|
||||
)
|
||||
from llama_stack.apis.safety import ViolationLevel
|
||||
from llama_stack.providers.datatypes import Api
|
||||
|
||||
|
|
@ -42,7 +47,9 @@ def common_params(inference_model):
|
|||
model=inference_model,
|
||||
instructions="You are a helpful assistant.",
|
||||
enable_session_persistence=True,
|
||||
sampling_params=SamplingParams(temperature=0.7, top_p=0.95),
|
||||
sampling_params=SamplingParams(
|
||||
strategy=TopPSamplingStrategy(temperature=0.7, top_p=0.95)
|
||||
),
|
||||
input_shields=[],
|
||||
output_shields=[],
|
||||
toolgroups=[],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue