From 2ca7cd49ed4ca77e21dcaf37f678d1362194f1cf Mon Sep 17 00:00:00 2001 From: David Newell Date: Mon, 29 Jan 2024 11:17:03 +0000 Subject: [PATCH] change import --- posthog/hogql/ai.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/posthog/hogql/ai.py b/posthog/hogql/ai.py index 4d7661713e348..51123111f99c3 100644 --- a/posthog/hogql/ai.py +++ b/posthog/hogql/ai.py @@ -1,6 +1,5 @@ from typing import TYPE_CHECKING, Optional import openai -from openai.types.chat import ChatCompletionMessageParam from posthog.event_usage import report_user_action from posthog.hogql.context import HogQLContext from posthog.hogql.errors import HogQLException @@ -69,7 +68,7 @@ def write_sql_from_prompt(prompt: str, *, current_query: Optional[str] = None, t ) ) instance_region = get_instance_region() or "HOBBY" - messages: list[ChatCompletionMessageParam] = [ + messages: list[openai.types.chat.ChatCompletionMessageParam] = [ {"role": "system", "content": IDENTITY_MESSAGE}, { "role": "system",