From d03f43aead578c0679dca60f97aa1d969564c71e Mon Sep 17 00:00:00 2001 From: Archit Dwivedi Date: Sat, 27 Jan 2024 01:58:30 +0530 Subject: [PATCH] Update openai_embeddings.py --- src/vanna/openai/openai_embeddings.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/vanna/openai/openai_embeddings.py b/src/vanna/openai/openai_embeddings.py index 9d3fcd65..d1063e4a 100644 --- a/src/vanna/openai/openai_embeddings.py +++ b/src/vanna/openai/openai_embeddings.py @@ -6,8 +6,15 @@ class OpenAI_Embeddings(VannaBase): - def __init__(self, config=None): + def __init__(self, client=None, config=None): VannaBase.__init__(self, config=config) + + if client is not None: + self.client = client + return + + if self.client is not None: + return self.client = OpenAI()