Skip to content

Commit a0fa3cc

Browse files
committed
wip
1 parent b914fc3 commit a0fa3cc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/ai/instructions/ai-llm.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ Here is a minimal example of developing a new LLM
44

55
```python
66
from vision_agents.core.llm.llm import LLM, LLMResponseEvent
7-
from vision_agents.core.events import LLMResponseChunkEvent
7+
from vision_agents.core.llm.events import LLMResponseCompletedEvent, LLMResponseChunkEvent
88
from vision_agents.core.processors import Processor
99

1010
class MyLLM(LLM):
1111
def __init__(self, model: str, client: Optional[ClientType]):
1212
# it should be possible to pass the client (makes it easier for users to customize things)
1313
# settings that are common to change, like model should be specified as well
1414
super().__init__()
15-
self.model=model
15+
self.model = model
1616
self.client = client
1717

1818

@@ -29,6 +29,7 @@ class MyLLM(LLM):
2929
response_iterator = await self.client.mynativemethod(self, *args, **kwargs)
3030

3131
# while receiving streaming do this
32+
total_text = ""
3233
for chunk in response_iterator:
3334
self.events.send(LLMResponseChunkEvent(
3435
plugin_name="gemini",

0 commit comments

Comments
 (0)