mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-07 12:47:37 +00:00
set temp=0, re-record
This commit is contained in:
parent
c24a2d8929
commit
958336cc98
72 changed files with 86 additions and 18070 deletions
|
@ -290,12 +290,11 @@ class LlamaGuardShield:
|
|||
else:
|
||||
shield_input_message = self.build_text_shield_input(messages)
|
||||
|
||||
# TODO: llama-stack inference protocol has issues with non-streaming inference code
|
||||
response = await self.inference_api.openai_chat_completion(
|
||||
model=self.model,
|
||||
messages=[shield_input_message],
|
||||
stream=False,
|
||||
temperature=0.0001, # TODO: find a better way
|
||||
temperature=0.0, # default is 1, which is too high for safety
|
||||
)
|
||||
content = response.choices[0].message.content
|
||||
content = content.strip()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue