Update engines/orpheus_engine.py
Browse files
engines/orpheus_engine.py
CHANGED
|
@@ -14,6 +14,7 @@ DEFAULT_API_URL = "http://127.0.0.1:1234"
|
|
| 14 |
DEFAULT_HEADERS = {"Content-Type": "application/json"}
|
| 15 |
DEFAULT_MODEL = "SebastianBodza/Kartoffel_Orpheus-3B_german_synthetic-v0.1"
|
| 16 |
DEFAULT_VOICE = "Martin"
|
|
|
|
| 17 |
SAMPLE_RATE = 24000 # Specific sample rate for Orpheus
|
| 18 |
|
| 19 |
# Special token definitions for prompt formatting and token decoding
|
|
@@ -185,7 +186,7 @@ class OrpheusEngine(BaseEngine):
|
|
| 185 |
|
| 186 |
payload = {
|
| 187 |
"model": self.model,
|
| 188 |
-
"messages": [{"role": "user", "content":
|
| 189 |
"max_tokens": self.max_tokens,
|
| 190 |
"temperature": self.temperature,
|
| 191 |
"top_p": self.top_p,
|
|
|
|
| 14 |
DEFAULT_HEADERS = {"Content-Type": "application/json"}
|
| 15 |
DEFAULT_MODEL = "SebastianBodza/Kartoffel_Orpheus-3B_german_synthetic-v0.1"
|
| 16 |
DEFAULT_VOICE = "Martin"
|
| 17 |
+
STOP_SEQUENCE = "<custom_token_2>"
|
| 18 |
SAMPLE_RATE = 24000 # Specific sample rate for Orpheus
|
| 19 |
|
| 20 |
# Special token definitions for prompt formatting and token decoding
|
|
|
|
| 186 |
|
| 187 |
payload = {
|
| 188 |
"model": self.model,
|
| 189 |
+
"messages": [{"role": "user", "content": f"<|audio|>{voice}: {text}<|eot_id|>"}],
|
| 190 |
"max_tokens": self.max_tokens,
|
| 191 |
"temperature": self.temperature,
|
| 192 |
"top_p": self.top_p,
|