3
3
"""
4
4
Test integrity of base class.
5
5
"""
6
- import pinecone
7
6
import pytest # pylint: disable=unused-import
8
7
from langchain .chat_models import ChatOpenAI
9
8
from langchain .embeddings import OpenAIEmbeddings
10
9
from langchain .text_splitter import RecursiveCharacterTextSplitter
11
10
from langchain .vectorstores .pinecone import Pinecone
12
11
13
- from ..const import Credentials
14
12
from ..ssm import SalesSupportModel
15
13
16
14
@@ -30,20 +28,3 @@ def test_02_class_aatribute_types(self):
30
28
assert isinstance (ssm .pinecone_index , Pinecone )
31
29
assert isinstance (ssm .text_splitter , RecursiveCharacterTextSplitter )
32
30
assert isinstance (ssm .openai_embedding , OpenAIEmbeddings )
33
-
34
- def test_03_test_openai_connectivity (self ):
35
- """Ensure that we have connectivity to OpenAI."""
36
-
37
- ssm = SalesSupportModel ()
38
- retval = ssm .cached_chat_request (
39
- "your are a helpful assistant" , "please return the value 'CORRECT' in all upper case."
40
- )
41
- assert retval == "CORRECT"
42
-
43
- def test_04_test_pinecone_connectivity (self ):
44
- """Ensure that we have connectivity to Pinecone."""
45
- # pylint: disable=broad-except
46
- try :
47
- pinecone .init (api_key = Credentials .PINECONE_API_KEY , environment = Credentials .PINECONE_ENVIRONMENT )
48
- except Exception as e :
49
- assert False , f"pinecone.init() failed with exception: { e } "
0 commit comments