Skip to content

Commit

Permalink
Update document_ai_api_version_workflow.py
Browse files Browse the repository at this point in the history
Fix import. Move from file scope to funciton scope otherwise it will error out when building the images because the module is not found.
  • Loading branch information
stangirala authored Nov 22, 2024
1 parent 454eeaa commit 00ffb2d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from indexify.functions_sdk.data_objects import File
from indexify import indexify_function, Graph, RemoteGraph, Image
from typing import Optional, List, Any
import openai


image = (
Expand Down Expand Up @@ -108,6 +107,7 @@ def _create_message(system_prompt: str, user_prompt: str, markdown: str) -> List


def _call_oai_client(system_prompt: str, user_prompt: str, markdown: str) -> str:
import openai
OPENAI_API_KEY = "EDIT_ADD_KEY"

client = openai.OpenAI(api_key=OPENAI_API_KEY)
Expand Down

0 comments on commit 00ffb2d

Please sign in to comment.