Skip to content

Commit

Permalink
Updated documents
Browse files Browse the repository at this point in the history
  • Loading branch information
xinh3ng committed Dec 4, 2024
1 parent 6254cd8 commit 8e13afa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@

import logging
import os
import pytest
from pytest import approx
import uuid
from typing import Generator, Union

import pytest
from langchain_core.documents import Document
from pytest import approx

from langchain_community.embeddings.openai import OpenAIEmbeddings
from langchain_community.vectorstores.weaviate import Weaviate
from tests.integration_tests.vectorstores.fake_embeddings import FakeEmbeddings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,3 @@ def test_weaviate() -> None:

# Test the retriever
retriever.get_relevant_documents("test")
print("Successfully passed test_weaviate")
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Test Weaviate V4 functionality.
"""Test Weaviate V4 functionality under libs/langchain/
# Launch the Weaviate pod
cd tests/integration_tests/vectorstores/docker-compose
Expand All @@ -11,15 +11,13 @@

import logging
import os
import uuid
from typing import Generator, Union

import pytest
import weaviate
from langchain_core.documents import Document
from langchain_openai import OpenAIEmbeddings
from langchain_weaviate.vectorstores import WeaviateVectorStore
from pytest import approx
from weaviate.classes.config import DataType, Property
from weaviate.classes.query import Filter

Expand Down Expand Up @@ -70,6 +68,7 @@ def weaviate_client(
host=weaviate_host, port=weaviate_port
)
# Create the collection if not exists
# The collection name is assumed to be "test" throughout the test module
if not weaviate_client.collections.exists("test"):
weaviate_client.collections.create(
name="test", properties=[Property(name="name", data_type=DataType.TEXT)]
Expand Down

0 comments on commit 8e13afa

Please sign in to comment.