Skip to content

Commit

Permalink
fix base url compatibility between weaviate and verba
Browse files Browse the repository at this point in the history
  • Loading branch information
samos123 committed May 8, 2024
1 parent 32e1231 commit 3960c17
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions goldenverba/components/schema/schema_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ def verify_vectorizer(

base_url = os.getenv("OPENAI_BASE_URL", "")
if vectorizer == "text2vec-openai" and base_url:
# check if base_url ends with v1 and strip it since Weaviate automatically adds v1
if base_url.endswith("v1"):
base_url = base_url[:-2]
if vectorizer_config == {}:
vectorizer_config = {
"text2vec-openai": {
Expand Down

0 comments on commit 3960c17

Please sign in to comment.