Skip to content

asynchronous support #10

Description

@666o

The code on github is out of sync with that in pypi, but
It seems that async is not used when calling the openai.ChatCompletion.create function, as follows:

# doctran/transformers/transformers.py
completion = self.config.openai.ChatCompletion.create(**function_call.dict())
arguments = completion.choices[0].message["function_call"]["arguments"]

Maybe it should?

# doctran/transformers/transformers.py
completion = await self.config.openai.ChatCompletion.acreate(**function_call.dict())
arguments = completion.choices[0].message["function_call"]["arguments"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions