async def __call__(self, messages: list[dict]) -> ChatCompletion:
        """Create a chat completion.

        Args:
            messages: A list of messages to use for the completion.
                message format: {"role": "user", "content": "Hello, world!"}

        Returns:
            A ChatCompletion instance.
        """
        messages = self._prepare_messages(messages)
        return await self._client.chat.completions.create(
            messages=messages,
            model=self.model,
            **self.create_kwargs,
        )
Create a chat completion.

        Args:
            messages: A list of messages to use for the completion.
                message format: {"role": "user", "content": "Hello, world!"}

        Returns:
            A ChatCompletion instance.
        
lanarky/adapters/openai/resources.py