-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
282 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
from ._client import Client | ||
from ._model import Model | ||
from ._state import BaseState, Message | ||
from ._state import Message, State | ||
|
||
__all__ = [ | ||
"Model", | ||
"role", | ||
"BaseState", | ||
"State", | ||
"Message", | ||
"Client", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from abc import ABC, abstractmethod | ||
from typing import Generic, Iterator, TypeVar | ||
|
||
from ...experimental.ast import MessageChunk, Node | ||
from ._state import State | ||
|
||
S = TypeVar("S", bound=State) | ||
|
||
|
||
class Client(ABC, Generic[S]): | ||
@abstractmethod | ||
def run(self, state: S, node: Node) -> Iterator[MessageChunk]: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
from ._tokenizer import Tokenizer # isort:skip | ||
from ._client import EngineClient | ||
from ._engine import Engine | ||
from ._model import Model, ModelWithEngine | ||
from ._state import EngineState | ||
from ._state import EngineState, Llama3VisionState, Phi3VisionState | ||
|
||
__all__ = [ | ||
"Tokenizer", | ||
"Engine", | ||
"Model", | ||
"ModelWithEngine", | ||
"EngineClient", | ||
"EngineState", | ||
"Llama3VisionState", | ||
"Phi3VisionState", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.