-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmock.py
More file actions
40 lines (32 loc) 路 1014 Bytes
/
Copy pathmock.py
File metadata and controls
40 lines (32 loc) 路 1014 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from typing import AsyncGenerator, Dict, Any
from repoforge.providers.base import BaseProvider
class MockProvider(BaseProvider):
def _initialize(self):
pass
def generate(self, prompt: str, system_prompt: str = "", **kwargs) -> str:
return (
"馃 Mock Provider\n"
"====================\n"
f"Prompt: {prompt}\n"
"\nRepoForge orchestration is working!"
)
async def stream(
self,
prompt: str,
system_prompt: str = "",
**kwargs
) -> AsyncGenerator[str, None]:
yield self.generate(prompt, system_prompt, **kwargs)
def get_capabilities(self) -> Dict[str, Any]:
return {
"chat": True,
"stream": True,
"vision": False,
"tools": False,
}
@property
def name(self) -> str:
return "Mock Provider"
@property
def models(self) -> list:
return ["mock-v1"]