Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/pdl/pdl_granite_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def processor_of_block(block: GraniteioModelBlock):
assert isinstance(model, str), f"The model should be a string: {model}"
assert isinstance(
backend, (dict, str)
), f"The backend should be a string or a dictionnary: {backend}"
), f"The backend should be a string or a dictionary: {backend}"
match backend:
case {"transformers": device}:
assert isinstance(backend, dict)
Expand Down Expand Up @@ -83,7 +83,9 @@ async def async_generate_text(
assert parameters is None or isinstance(parameters, dict)
io_processor = GraniteioModel.processor_of_block(block)
inputs = GraniteioModel.build_message(messages, parameters)
result = io_processor.create_chat_completion(inputs) # pyright: ignore
result = await io_processor.acreate_chat_completion( # pyright: ignore
inputs
)
try: # TODO: update when new version of granite-io is released
message = result.next_message.model_dump()
except AttributeError:
Expand Down