Skip to content

Commit

Permalink
fix: updated import
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanleomk committed Nov 28, 2024
1 parent 2b2433e commit d66fa96
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions docs/integrations/cortex.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,12 @@ from pydantic import BaseModel
import asyncio

# Initialize with API key
client = AsyncOpenAI(api_key=os.getenv('OPENAI_API_KEY'))

# Enable instructor patches for async OpenAI client
client = instructor.from_openai(client)
client = from_openai(
openai.AsyncOpenAI(
base_url="http://localhost:39281/v1",
api_key="this is a fake api key that doesn't matter",
)
)

class User(BaseModel):
name: str
Expand Down

0 comments on commit d66fa96

Please sign in to comment.