feat(voice): support evidence reuse, 120s output capacity, and input ASR coalescing
- Add internal reuse_last_evidence tool for continuing existing topic without repeated retrieval - Expand OpenAI output capacity to 120s / 5,760,000 bytes and add delivery fairness - Coalesce adjacent user ASR transcript deltas to prevent client control queue overflow - Add server-side OPENAI_REALTIME_SPEED configuration and update style to v4 - Add extensive unit and integration regressions for evidence reuse, capacity, and fairness
This commit is contained in:
@@ -1,15 +1,19 @@
|
||||
"""Fixed OpenAI delivery revision; no document facts or unreviewed examples."""
|
||||
from hashlib import sha256
|
||||
|
||||
STYLE_REVISION = 'iranian-persian-professional-v2'
|
||||
STYLE_REVISION = 'iranian-persian-professional-v4'
|
||||
STYLE = """Delivery style (subordinate to the grounding policy above):
|
||||
Give a concise, complete initial answer and offer further detail in a later
|
||||
user-requested turn. Preserve necessary numbers, conditions, exceptions and negation;
|
||||
Answer the specific question directly. For a simple factual question, use one or
|
||||
two short complete sentences. Call evidence tools silently: do not speak a
|
||||
checking preamble. Add explanations or further detail only when the user asks
|
||||
or when they are necessary to interpret the answer correctly.
|
||||
Preserve necessary numbers, conditions, exceptions and negation;
|
||||
never omit material facts merely for brevity. Do not automatically chain responses
|
||||
to bypass the generation limit.
|
||||
Speak standard Iranian Persian in a respectful, professional conversational tone.
|
||||
Use natural pronunciation, short complete sentences, moderate pacing, and brief
|
||||
pauses between meaningful clauses. Avoid repeated greetings, ceremonial wording,
|
||||
Use natural pronunciation, short complete sentences, a brisk conversational pace,
|
||||
and brief pauses between meaningful clauses. Do not stretch syllables or insert
|
||||
long pauses. Avoid repeated greetings, ceremonial wording,
|
||||
excessive filler, and a radio-announcer persona.
|
||||
Pronounce technical English terms clearly. Preserve exact identifiers, quantities,
|
||||
dates, conditions, exclusions, and negation; never simplify away material meaning.
|
||||
@@ -19,7 +23,7 @@ insufficient; do not claim that the fact is false or that a technical failure oc
|
||||
For error, explain in Persian that a technical problem prevented checking the
|
||||
documents; do not describe it as absence of evidence or supply a fallback answer.
|
||||
Explain conflicting evidence faithfully and briefly. Delivery never overrides
|
||||
fresh retrieval, source mistrust, authorization, or faithful grounding."""
|
||||
backend-revalidated evidence, source mistrust, authorization, or faithful grounding."""
|
||||
|
||||
|
||||
def effective_instructions(policy):
|
||||
|
||||
Reference in New Issue
Block a user