mirror of
https://github.com/acon96/home-llm.git
synced 2026-01-10 06:07:58 -05:00
fix outputs
This commit is contained in:
@@ -230,7 +230,7 @@ class LLaMAAgent(conversation.AbstractConversationAgent):
|
||||
self.history[conversation_id] = prompt
|
||||
|
||||
exposed_entities = list(self._async_get_exposed_entities()[0].keys())
|
||||
pattern = re.compile(r"```homeassistant\n([\S\n]*)```")
|
||||
pattern = re.compile(r"```homeassistant\n([\S \t\n]*)```")
|
||||
|
||||
to_say = pattern.sub("", response).strip()
|
||||
for block in pattern.findall(response.strip()):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
root ::= ws tosay ws functioncalls?
|
||||
root ::= (ws tosay)+ ws functioncalls?
|
||||
|
||||
tosay ::= [0-9a-zA-Z ]*
|
||||
tosay ::= [0-9a-zA-Z .#%]*
|
||||
functioncalls ::=
|
||||
"```homeassistant\n" (object ws)* "```"
|
||||
|
||||
|
||||
@@ -11,4 +11,4 @@ if [[ ! -d "./models/$MODEL_NAME" ]]; then
|
||||
fi
|
||||
|
||||
PROMPT=$(cat $PROMPT_SRC)
|
||||
$LLAMA_CPP/build/bin/main --model "./models/$MODEL_NAME/$MODEL_NAME.$QUANT_TYPE.gguf" --temp 0.1 --ctx-size 2048 --prompt "$PROMPT" --grammar-file ./custom_components/llama_conversation/output.gbnf
|
||||
$LLAMA_CPP/build/bin/main --model "./models/$MODEL_NAME/$MODEL_NAME.$QUANT_TYPE.gguf" --temp 0.1 --ctx-size 2048 --prompt "$PROMPT" --grammar-file ./custom_components/llama_conversation/output.gbnf
|
||||
|
||||
Reference in New Issue
Block a user