fix: 🐛 templating fix for queued LLM
This commit is contained in:
parent
44070ac185
commit
5c6609ab5f
2 changed files with 7 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import json
|
||||
import ssl
|
||||
from typing import Any, Coroutine, List, Optional
|
||||
from typing import Any, Callable, Coroutine, Dict, List, Optional
|
||||
|
||||
import aiohttp
|
||||
|
||||
|
|
@ -19,7 +19,9 @@ class GGML(LLM):
|
|||
ca_bundle_path: str = None
|
||||
model: str = "ggml"
|
||||
|
||||
template_messages = llama2_template_messages
|
||||
template_messages: Optional[
|
||||
Callable[[List[Dict[str, str]]], str]
|
||||
] = llama2_template_messages
|
||||
|
||||
prompt_templates = {
|
||||
"edit": simplified_edit_prompt,
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ class QueuedLLM(LLM):
|
|||
await self.llm.start(*args, **kwargs)
|
||||
self._lock = asyncio.Lock()
|
||||
self.model = self.llm.model
|
||||
self.template_messages = self.llm.template_messages
|
||||
self.prompt_templates = self.llm.prompt_templates
|
||||
self.context_length = self.llm.context_length
|
||||
|
||||
async def stop(self):
|
||||
await self.llm.stop()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue