Skip to content

Commit c5a34f8

Browse files
committed
Use granite-io async interface
Signed-off-by: Louis Mandel <[email protected]>
1 parent 19349ab commit c5a34f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pdl/pdl_granite_io.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def processor_of_block(block: GraniteioModelBlock):
2424
assert isinstance(model, str), f"The model should be a string: {model}"
2525
assert isinstance(
2626
backend, (dict, str)
27-
), f"The backend should be a string or a dictionnary: {backend}"
27+
), f"The backend should be a string or a dictionary: {backend}"
2828
match backend:
2929
case {"transformers": device}:
3030
assert isinstance(backend, dict)
@@ -83,7 +83,7 @@ async def async_generate_text(
8383
assert parameters is None or isinstance(parameters, dict)
8484
io_processor = GraniteioModel.processor_of_block(block)
8585
inputs = GraniteioModel.build_message(messages, parameters)
86-
result = io_processor.create_chat_completion(inputs) # pyright: ignore
86+
result = await io_processor.acreate_chat_completion(inputs) # pyright: ignore
8787
try: # TODO: update when new version of granite-io is released
8888
message = result.next_message.model_dump()
8989
except AttributeError:

0 commit comments

Comments
 (0)