File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff 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,9 @@ 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 ( # pyright: ignore
87+ inputs
88+ )
8789 try : # TODO: update when new version of granite-io is released
8890 message = result .next_message .model_dump ()
8991 except AttributeError :
You can’t perform that action at this time.
0 commit comments