File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change 8
8
from azure .identity import AzureDeveloperCliCredential , get_bearer_token_provider
9
9
from azure .search .documents import SearchClient
10
10
from dotenv_azd import load_azd_env
11
- from langchain_community .document_loaders import JSONLoader
12
11
from langchain_core .documents import Document as LCDocument
13
12
from langchain_openai import AzureChatOpenAI , AzureOpenAIEmbeddings
14
13
from ragas .embeddings import LangchainEmbeddingsWrapper
@@ -40,15 +39,10 @@ def get_search_documents(azure_credential) -> str:
40
39
index_name = os .getenv ("AZURE_SEARCH_INDEX" ),
41
40
credential = azure_credential ,
42
41
)
43
- search_results = search_client .search (search_text = "*" , top = 10 )
42
+ search_results = search_client .search (search_text = "*" , top = 1000 )
44
43
return [result for result in search_results ]
45
44
46
45
47
- path = root_dir / "data/Json_Examples/2189.json"
48
- loader = JSONLoader (path , jq_schema = ".Description" )
49
- docs = loader .load ()
50
-
51
-
52
46
azure_credential = get_azure_credential ()
53
47
azure_openai_api_version = os .getenv ("AZURE_OPENAI_API_VERSION" ) or "2024-06-01"
54
48
azure_endpoint = f"https://{ os .getenv ('AZURE_OPENAI_SERVICE' )} .openai.azure.com"
You can’t perform that action at this time.
0 commit comments