code
stringlengths
141
97.3k
apis
listlengths
1
24
extract_api
stringlengths
113
214k
from unittest.mock import MagicMock, patch import pytest try: import google.ai.generativelanguage as genai has_google = True except ImportError: has_google = False from llama_index.legacy.response_synthesizers.google.generativeai import ( GoogleTextSynthesizer, set_google_config, ) from llama_in...
[ "llama_index.legacy.vector_stores.google.generativeai.genai_extension.get_config", "llama_index.legacy.response_synthesizers.google.generativeai.GoogleTextSynthesizer.from_defaults", "llama_index.legacy.schema.TextNode", "llama_index.legacy.response_synthesizers.google.generativeai.set_google_config" ]
[((663, 722), 'pytest.mark.skipif', 'pytest.mark.skipif', (['(not has_google)'], {'reason': 'SKIP_TEST_REASON'}), '(not has_google, reason=SKIP_TEST_REASON)\n', (681, 722), False, 'import pytest\n'), ((724, 768), 'unittest.mock.patch', 'patch', (['"""google.auth.credentials.Credentials"""'], {}), "('google.auth.credent...
"""Global eval handlers.""" from typing import Any from llama_index.callbacks.arize_phoenix_callback import arize_phoenix_callback_handler from llama_index.callbacks.base_handler import BaseCallbackHandler from llama_index.callbacks.deepeval_callback import deepeval_callback_handler from llama_index.callbacks.honeyhi...
[ "llama_index.callbacks.open_inference_callback.OpenInferenceCallbackHandler", "llama_index.callbacks.simple_llm_handler.SimpleLLMHandler", "llama_index.callbacks.deepeval_callback.deepeval_callback_handler", "llama_index.callbacks.wandb_callback.WandbCallbackHandler", "llama_index.callbacks.arize_phoenix_ca...
[((1068, 1103), 'llama_index.callbacks.wandb_callback.WandbCallbackHandler', 'WandbCallbackHandler', ([], {}), '(**eval_params)\n', (1088, 1103), False, 'from llama_index.callbacks.wandb_callback import WandbCallbackHandler\n'), ((1161, 1204), 'llama_index.callbacks.open_inference_callback.OpenInferenceCallbackHandler'...
"""Global eval handlers.""" from typing import Any from llama_index.callbacks.argilla_callback import argilla_callback_handler from llama_index.callbacks.arize_phoenix_callback import arize_phoenix_callback_handler from llama_index.callbacks.base_handler import BaseCallbackHandler from llama_index.callbacks.deepeval_...
[ "llama_index.callbacks.open_inference_callback.OpenInferenceCallbackHandler", "llama_index.callbacks.simple_llm_handler.SimpleLLMHandler", "llama_index.callbacks.deepeval_callback.deepeval_callback_handler", "llama_index.callbacks.wandb_callback.WandbCallbackHandler", "llama_index.callbacks.arize_phoenix_ca...
[((1144, 1179), 'llama_index.callbacks.wandb_callback.WandbCallbackHandler', 'WandbCallbackHandler', ([], {}), '(**eval_params)\n', (1164, 1179), False, 'from llama_index.callbacks.wandb_callback import WandbCallbackHandler\n'), ((1237, 1280), 'llama_index.callbacks.open_inference_callback.OpenInferenceCallbackHandler'...
"""Elasticsearch vector store.""" import asyncio import uuid from logging import getLogger from typing import Any, Callable, Dict, List, Literal, Optional, Union, cast import nest_asyncio import numpy as np from llama_index.schema import BaseNode, MetadataMode, TextNode from llama_index.vector_stores.types import ( ...
[ "llama_index.schema.TextNode", "llama_index.vector_stores.utils.metadata_dict_to_node", "llama_index.vector_stores.utils.node_to_metadata_dict" ]
[((534, 553), 'logging.getLogger', 'getLogger', (['__name__'], {}), '(__name__)\n', (543, 553), False, 'from logging import getLogger\n'), ((2379, 2432), 'elasticsearch.AsyncElasticsearch', 'elasticsearch.AsyncElasticsearch', ([], {}), '(**connection_params)\n', (2411, 2432), False, 'import elasticsearch\n'), ((3755, 3...
"""Elasticsearch vector store.""" import asyncio import uuid from logging import getLogger from typing import Any, Callable, Dict, List, Literal, Optional, Union, cast import nest_asyncio import numpy as np from llama_index.schema import BaseNode, MetadataMode, TextNode from llama_index.vector_stores.types import ( ...
[ "llama_index.schema.TextNode", "llama_index.vector_stores.utils.metadata_dict_to_node", "llama_index.vector_stores.utils.node_to_metadata_dict" ]
[((534, 553), 'logging.getLogger', 'getLogger', (['__name__'], {}), '(__name__)\n', (543, 553), False, 'from logging import getLogger\n'), ((2379, 2432), 'elasticsearch.AsyncElasticsearch', 'elasticsearch.AsyncElasticsearch', ([], {}), '(**connection_params)\n', (2411, 2432), False, 'import elasticsearch\n'), ((3755, 3...
"""Global eval handlers.""" from typing import Any from llama_index.callbacks.arize_phoenix_callback import arize_phoenix_callback_handler from llama_index.callbacks.base_handler import BaseCallbackHandler from llama_index.callbacks.honeyhive_callback import honeyhive_callback_handler from llama_index.callbacks.open_...
[ "llama_index.callbacks.open_inference_callback.OpenInferenceCallbackHandler", "llama_index.callbacks.simple_llm_handler.SimpleLLMHandler", "llama_index.callbacks.wandb_callback.WandbCallbackHandler", "llama_index.callbacks.arize_phoenix_callback.arize_phoenix_callback_handler", "llama_index.callbacks.honeyh...
[((990, 1025), 'llama_index.callbacks.wandb_callback.WandbCallbackHandler', 'WandbCallbackHandler', ([], {}), '(**eval_params)\n', (1010, 1025), False, 'from llama_index.callbacks.wandb_callback import WandbCallbackHandler\n'), ((1083, 1126), 'llama_index.callbacks.open_inference_callback.OpenInferenceCallbackHandler',...
"""Global eval handlers.""" from typing import Any from llama_index.callbacks.arize_phoenix_callback import arize_phoenix_callback_handler from llama_index.callbacks.base_handler import BaseCallbackHandler from llama_index.callbacks.honeyhive_callback import honeyhive_callback_handler from llama_index.callbacks.open_...
[ "llama_index.callbacks.open_inference_callback.OpenInferenceCallbackHandler", "llama_index.callbacks.simple_llm_handler.SimpleLLMHandler", "llama_index.callbacks.wandb_callback.WandbCallbackHandler", "llama_index.callbacks.arize_phoenix_callback.arize_phoenix_callback_handler", "llama_index.callbacks.honeyh...
[((990, 1025), 'llama_index.callbacks.wandb_callback.WandbCallbackHandler', 'WandbCallbackHandler', ([], {}), '(**eval_params)\n', (1010, 1025), False, 'from llama_index.callbacks.wandb_callback import WandbCallbackHandler\n'), ((1083, 1126), 'llama_index.callbacks.open_inference_callback.OpenInferenceCallbackHandler',...
"""Google GenerativeAI Attributed Question and Answering (AQA) service. The GenAI Semantic AQA API is a managed end to end service that allows developers to create responses grounded on specified passages based on a user query. For more information visit: https://developers.generativeai.google/guide """ import loggin...
[ "llama_index.legacy.schema.TextNode", "llama_index.legacy.indices.query.schema.QueryBundle", "llama_index.legacy.vector_stores.google.generativeai.genai_extension.build_generative_service", "llama_index.legacy.core.response.schema.Response" ]
[((1114, 1141), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1131, 1141), False, 'import logging\n'), ((2809, 2842), 'llama_index.legacy.vector_stores.google.generativeai.genai_extension.build_generative_service', 'genaix.build_generative_service', ([], {}), '()\n', (2840, 2842), True,...
"""Google GenerativeAI Attributed Question and Answering (AQA) service. The GenAI Semantic AQA API is a managed end to end service that allows developers to create responses grounded on specified passages based on a user query. For more information visit: https://developers.generativeai.google/guide """ import loggin...
[ "llama_index.legacy.schema.TextNode", "llama_index.legacy.indices.query.schema.QueryBundle", "llama_index.legacy.vector_stores.google.generativeai.genai_extension.build_generative_service", "llama_index.legacy.core.response.schema.Response" ]
[((1114, 1141), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1131, 1141), False, 'import logging\n'), ((2809, 2842), 'llama_index.legacy.vector_stores.google.generativeai.genai_extension.build_generative_service', 'genaix.build_generative_service', ([], {}), '()\n', (2840, 2842), True,...
"""Elasticsearch vector store.""" import asyncio import uuid from logging import getLogger from typing import Any, Callable, Dict, List, Literal, Optional, Union, cast import nest_asyncio import numpy as np from llama_index.legacy.bridge.pydantic import PrivateAttr from llama_index.legacy.schema import BaseNode, Met...
[ "llama_index.legacy.vector_stores.utils.metadata_dict_to_node", "llama_index.legacy.bridge.pydantic.PrivateAttr", "llama_index.legacy.schema.TextNode", "llama_index.legacy.vector_stores.utils.node_to_metadata_dict" ]
[((640, 659), 'logging.getLogger', 'getLogger', (['__name__'], {}), '(__name__)\n', (649, 659), False, 'from logging import getLogger\n'), ((2343, 2396), 'elasticsearch.AsyncElasticsearch', 'elasticsearch.AsyncElasticsearch', ([], {}), '(**connection_params)\n', (2375, 2396), False, 'import elasticsearch\n'), ((3719, 3...
"""Elasticsearch vector store.""" import asyncio import uuid from logging import getLogger from typing import Any, Callable, Dict, List, Literal, Optional, Union, cast import nest_asyncio import numpy as np from llama_index.legacy.bridge.pydantic import PrivateAttr from llama_index.legacy.schema import BaseNode, Met...
[ "llama_index.legacy.vector_stores.utils.metadata_dict_to_node", "llama_index.legacy.bridge.pydantic.PrivateAttr", "llama_index.legacy.schema.TextNode", "llama_index.legacy.vector_stores.utils.node_to_metadata_dict" ]
[((640, 659), 'logging.getLogger', 'getLogger', (['__name__'], {}), '(__name__)\n', (649, 659), False, 'from logging import getLogger\n'), ((2343, 2396), 'elasticsearch.AsyncElasticsearch', 'elasticsearch.AsyncElasticsearch', ([], {}), '(**connection_params)\n', (2375, 2396), False, 'import elasticsearch\n'), ((3719, 3...
"""Google Generative AI Vector Store. The GenAI Semantic Retriever API is a managed end-to-end service that allows developers to create a corpus of documents to perform semantic search on related passages given a user query. For more information visit: https://developers.generativeai.google/guide """ import logging i...
[ "llama_index.vector_stores.google.genai_extension.delete_document", "llama_index.vector_stores.google.genai_extension.Config", "llama_index.vector_stores.google.genai_extension.get_corpus", "llama_index.vector_stores.google.genai_extension.EntityName.from_str", "llama_index.vector_stores.google.genai_extens...
[((812, 839), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (829, 839), False, 'import logging\n'), ((2859, 2881), 'llama_index.vector_stores.google.genai_extension.Config', 'genaix.Config', ([], {}), '(**attrs)\n', (2872, 2881), True, 'import llama_index.vector_stores.google.genai_exten...
"""Google GenerativeAI Attributed Question and Answering (AQA) service. The GenAI Semantic AQA API is a managed end to end service that allows developers to create responses grounded on specified passages based on a user query. For more information visit: https://developers.generativeai.google/guide """ import loggin...
[ "llama_index.vector_stores.google.generativeai.genai_extension.build_generative_service", "llama_index.core.response.schema.Response", "llama_index.schema.TextNode", "llama_index.indices.query.schema.QueryBundle" ]
[((1051, 1078), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1068, 1078), False, 'import logging\n'), ((2739, 2772), 'llama_index.vector_stores.google.generativeai.genai_extension.build_generative_service', 'genaix.build_generative_service', ([], {}), '()\n', (2770, 2772), True, 'impor...
"""FastAPI app creation, logger configuration and main API routes.""" import llama_index from private_gpt.di import global_injector from private_gpt.launcher import create_app # Add LlamaIndex simple observability llama_index.set_global_handler("simple") app = create_app(global_injector)
[ "llama_index.set_global_handler" ]
[((217, 257), 'llama_index.set_global_handler', 'llama_index.set_global_handler', (['"""simple"""'], {}), "('simple')\n", (247, 257), False, 'import llama_index\n'), ((265, 292), 'private_gpt.launcher.create_app', 'create_app', (['global_injector'], {}), '(global_injector)\n', (275, 292), False, 'from private_gpt.launc...
"""FastAPI app creation, logger configuration and main API routes.""" import llama_index from private_gpt.di import global_injector from private_gpt.launcher import create_app # Add LlamaIndex simple observability llama_index.set_global_handler("simple") app = create_app(global_injector)
[ "llama_index.set_global_handler" ]
[((217, 257), 'llama_index.set_global_handler', 'llama_index.set_global_handler', (['"""simple"""'], {}), "('simple')\n", (247, 257), False, 'import llama_index\n'), ((265, 292), 'private_gpt.launcher.create_app', 'create_app', (['global_injector'], {}), '(global_injector)\n', (275, 292), False, 'from private_gpt.launc...
"""FastAPI app creation, logger configuration and main API routes.""" import llama_index from private_gpt.di import global_injector from private_gpt.launcher import create_app # Add LlamaIndex simple observability llama_index.set_global_handler("simple") app = create_app(global_injector)
[ "llama_index.set_global_handler" ]
[((217, 257), 'llama_index.set_global_handler', 'llama_index.set_global_handler', (['"""simple"""'], {}), "('simple')\n", (247, 257), False, 'import llama_index\n'), ((265, 292), 'private_gpt.launcher.create_app', 'create_app', (['global_injector'], {}), '(global_injector)\n', (275, 292), False, 'from private_gpt.launc...
""" Astra DB Vector store index. An index based on a DB table with vector search capabilities, powered by the astrapy library """ import json import logging from typing import Any, Dict, List, Optional, cast from warnings import warn import llama_index.core from llama_index.core.bridge.pydantic import PrivateAttr f...
[ "llama_index.core.indices.query.embedding_utils.get_top_k_mmr_embeddings", "llama_index.core.bridge.pydantic.PrivateAttr", "llama_index.core.vector_stores.utils.node_to_metadata_dict", "llama_index.core.vector_stores.utils.metadata_dict_to_node", "llama_index.core.vector_stores.types.VectorStoreQueryResult"...
[((852, 879), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (869, 879), False, 'import logging\n'), ((2070, 2083), 'llama_index.core.bridge.pydantic.PrivateAttr', 'PrivateAttr', ([], {}), '()\n', (2081, 2083), False, 'from llama_index.core.bridge.pydantic import PrivateAttr\n'), ((2118, ...
from unittest.mock import MagicMock, patch import pytest from llama_index.legacy.core.response.schema import Response from llama_index.legacy.schema import Document try: import google.ai.generativelanguage as genai has_google = True except ImportError: has_google = False from llama_index.legacy.indices....
[ "llama_index.legacy.vector_stores.google.generativeai.genai_extension.get_config", "llama_index.legacy.indices.managed.google.generativeai.set_google_config", "llama_index.legacy.schema.Document", "llama_index.legacy.indices.managed.google.generativeai.GoogleIndex.from_corpus", "llama_index.legacy.indices.m...
[((693, 752), 'pytest.mark.skipif', 'pytest.mark.skipif', (['(not has_google)'], {'reason': 'SKIP_TEST_REASON'}), '(not has_google, reason=SKIP_TEST_REASON)\n', (711, 752), False, 'import pytest\n'), ((754, 798), 'unittest.mock.patch', 'patch', (['"""google.auth.credentials.Credentials"""'], {}), "('google.auth.credent...
from unittest.mock import MagicMock, patch import pytest try: import google.ai.generativelanguage as genai has_google = True except ImportError: has_google = False from llama_index.legacy.response_synthesizers.google.generativeai import ( GoogleTextSynthesizer, set_google_config, ) from llama_in...
[ "llama_index.legacy.vector_stores.google.generativeai.genai_extension.get_config", "llama_index.legacy.response_synthesizers.google.generativeai.GoogleTextSynthesizer.from_defaults", "llama_index.legacy.schema.TextNode", "llama_index.legacy.response_synthesizers.google.generativeai.set_google_config" ]
[((663, 722), 'pytest.mark.skipif', 'pytest.mark.skipif', (['(not has_google)'], {'reason': 'SKIP_TEST_REASON'}), '(not has_google, reason=SKIP_TEST_REASON)\n', (681, 722), False, 'import pytest\n'), ((724, 768), 'unittest.mock.patch', 'patch', (['"""google.auth.credentials.Credentials"""'], {}), "('google.auth.credent...
from typing import Any, Dict, List, Optional, Tuple from llama_index.core.base.base_query_engine import BaseQueryEngine from llama_index.core.base.response.schema import RESPONSE_TYPE from llama_index.core.callbacks.schema import CBEventType, EventPayload from llama_index.core.indices.composability.graph import Compos...
[ "llama_index.core.settings.callback_manager_from_settings_or_context", "llama_index.core.instrumentation.get_dispatcher", "llama_index.core.schema.NodeWithScore" ]
[((585, 620), 'llama_index.core.instrumentation.get_dispatcher', 'instrument.get_dispatcher', (['__name__'], {}), '(__name__)\n', (610, 620), True, 'import llama_index.core.instrumentation as instrument\n'), ((1649, 1734), 'llama_index.core.settings.callback_manager_from_settings_or_context', 'callback_manager_from_set...
from llama_index import ( SimpleDirectoryReader, VectorStoreIndex, ServiceContext, ) from llama_index.llms import LlamaCPP from llama_index.llms.llama_utils import messages_to_prompt, completion_to_prompt import llama_index.llms.llama_cpp from langchain.embeddings import HuggingFaceEmbeddings import co...
[ "llama_index.VectorStoreIndex.from_documents", "llama_index.ServiceContext.from_defaults", "llama_index.SimpleDirectoryReader" ]
[((431, 491), 'langchain.embeddings.HuggingFaceEmbeddings', 'HuggingFaceEmbeddings', ([], {'model_name': 'config.EMBEDDING_MODEL_URL'}), '(model_name=config.EMBEDDING_MODEL_URL)\n', (452, 491), False, 'from langchain.embeddings import HuggingFaceEmbeddings\n'), ((538, 600), 'llama_index.ServiceContext.from_defaults', '...
import time import llama_index from atlassian import Bitbucket import os import sys sys.path.append('../') import local_secrets as secrets start_time = time.time() stash = Bitbucket('https://git.techstyle.net', token=secrets.stash_token) os.environ['OPENAI_API_KEY'] = secrets.techstyle_openai_key project ='DATASICENCE...
[ "llama_index.GPTSimpleVectorIndex", "llama_index.Document" ]
[((84, 106), 'sys.path.append', 'sys.path.append', (['"""../"""'], {}), "('../')\n", (99, 106), False, 'import sys\n'), ((153, 164), 'time.time', 'time.time', ([], {}), '()\n', (162, 164), False, 'import time\n'), ((173, 238), 'atlassian.Bitbucket', 'Bitbucket', (['"""https://git.techstyle.net"""'], {'token': 'secrets....
import qdrant_client from llama_index import ( VectorStoreIndex, ServiceContext, ) from llama_index.llms import Ollama from llama_index.vector_stores.qdrant import QdrantVectorStore import llama_index llama_index.set_global_handler("simple") # re-initialize the vector store client = qdrant_client.QdrantClient...
[ "llama_index.vector_stores.qdrant.QdrantVectorStore", "llama_index.ServiceContext.from_defaults", "llama_index.llms.Ollama", "llama_index.set_global_handler", "llama_index.VectorStoreIndex.from_vector_store" ]
[((210, 250), 'llama_index.set_global_handler', 'llama_index.set_global_handler', (['"""simple"""'], {}), "('simple')\n", (240, 250), False, 'import llama_index\n'), ((294, 342), 'qdrant_client.QdrantClient', 'qdrant_client.QdrantClient', ([], {'path': '"""./qdrant_data"""'}), "(path='./qdrant_data')\n", (320, 342), Fa...
## main function of AWS Lambda function import llama_index from llama_index import download_loader import boto3 import json import urllib.parse from llama_index import SimpleDirectoryReader def main(event, context): # extracting s3 bucket and key information from SQS message print(event) s3_info = json.lo...
[ "llama_index.download_loader" ]
[((313, 352), 'json.loads', 'json.loads', (["event['Records'][0]['body']"], {}), "(event['Records'][0]['body'])\n", (323, 352), False, 'import json\n'), ((628, 692), 'llama_index.download_loader', 'download_loader', (['"""S3Reader"""'], {'custom_path': '"""/tmp/llamahub_modules"""'}), "('S3Reader', custom_path='/tmp/ll...
"""Download.""" import json import logging import os import subprocess import sys from enum import Enum from importlib import util from pathlib import Path from typing import Any, Dict, List, Optional, Union import pkg_resources import requests from pkg_resources import DistributionNotFound from llama_index.download....
[ "llama_index.download.utils.get_exports", "llama_index.download.utils.initialize_directory" ]
[((637, 664), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (654, 664), False, 'import logging\n'), ((5550, 5583), 'os.path.exists', 'os.path.exists', (['requirements_path'], {}), '(requirements_path)\n', (5564, 5583), False, 'import os\n'), ((7403, 7471), 'llama_index.download.utils.ini...
import json from typing import Dict, List import llama_index.query_engine from llama_index import ServiceContext, QueryBundle from llama_index.callbacks import CBEventType, LlamaDebugHandler, CallbackManager from llama_index.indices.base import BaseIndex from llama_index.indices.query.base import BaseQueryEngine from ...
[ "llama_index.callbacks.LlamaDebugHandler", "llama_index.response.schema.Response", "llama_index.ServiceContext.from_defaults", "llama_index.callbacks.CallbackManager" ]
[((1298, 1324), 'llama_index.response.schema.Response', 'Response', (['f"""ๆˆ‘ๆ˜ฏ{self.name}"""'], {}), "(f'ๆˆ‘ๆ˜ฏ{self.name}')\n", (1306, 1324), False, 'from llama_index.response.schema import RESPONSE_TYPE, Response\n'), ((2530, 2571), 'common.llm.create_llm', 'create_llm', (['cb_manager', 'LLM_CACHE_ENABLED'], {}), '(cb_man...
"""Download.""" import json import logging import os import subprocess import sys from enum import Enum from importlib import util from pathlib import Path from typing import Any, Dict, List, Optional, Union import pkg_resources import requests from pkg_resources import DistributionNotFound from llama_index.download....
[ "llama_index.download.utils.get_exports", "llama_index.download.utils.initialize_directory" ]
[((637, 664), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (654, 664), False, 'import logging\n'), ((5550, 5583), 'os.path.exists', 'os.path.exists', (['requirements_path'], {}), '(requirements_path)\n', (5564, 5583), False, 'import os\n'), ((7403, 7471), 'llama_index.download.utils.ini...
# Ultralytics YOLO ๐Ÿš€, AGPL-3.0 license import getpass from typing import List import cv2 import numpy as np import pandas as pd from ultralytics.data.augment import LetterBox from ultralytics.utils import LOGGER as logger from ultralytics.utils import SETTINGS from ultralytics.utils.checks import check_requirements...
[ "lancedb.pydantic.Vector" ]
[((3694, 3716), 'numpy.stack', 'np.stack', (['imgs'], {'axis': '(0)'}), '(imgs, axis=0)\n', (3702, 3716), True, 'import numpy as np\n'), ((4027, 4060), 'numpy.concatenate', 'np.concatenate', (['batch_idx'], {'axis': '(0)'}), '(batch_idx, axis=0)\n', (4041, 4060), True, 'import numpy as np\n'), ((4394, 4429), 'ultralyti...
# Copyright 2023 LanceDB Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
[ "lancedb.utils.CONFIG.copy", "lancedb.utils.CONFIG.update" ]
[((641, 654), 'click.group', 'click.group', ([], {}), '()\n', (652, 654), False, 'import click\n'), ((656, 727), 'click.version_option', 'click.version_option', ([], {'help': '"""LanceDB command line interface entry point"""'}), "(help='LanceDB command line interface entry point')\n", (676, 727), False, 'import click\n...
# Copyright (c) Hegel AI, Inc. # All rights reserved. # # This source code's license can be found in the # LICENSE file in the root directory of this source tree. import itertools import warnings import pandas as pd from typing import Callable, Optional try: import lancedb from lancedb.embeddings import with_...
[ "lancedb.embeddings.with_embeddings", "lancedb.connect" ]
[((797, 961), 'warnings.warn', 'warnings.warn', (['"""`nprobes` and `refine_factor` are not used by the default `query_builder`. Feel free to open an issue to request adding support for them."""'], {}), "(\n '`nprobes` and `refine_factor` are not used by the default `query_builder`. Feel free to open an issue to req...
import os from pathlib import Path from tqdm import tqdm from lancedb import connect from pydantic import BaseModel from lancedb.pydantic import LanceModel, Vector from lancedb.embeddings import get_registry from typing import Iterable DB_PATH = Path(os.getcwd(), "db") DATA_PATH = Path(os.getcwd(), "data") DB_TABLE =...
[ "lancedb.connect", "lancedb.embeddings.get_registry" ]
[((253, 264), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (262, 264), False, 'import os\n'), ((289, 300), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (298, 300), False, 'import os\n'), ((2068, 2084), 'lancedb.connect', 'connect', (['DB_PATH'], {}), '(DB_PATH)\n', (2075, 2084), False, 'from lancedb import connect\n'), (...
"""LanceDB vector store with cloud storage support.""" import os from typing import Any, Optional from dotenv import load_dotenv from llama_index.schema import NodeRelationship, RelatedNodeInfo, TextNode from llama_index.vector_stores import LanceDBVectorStore as LanceDBVectorStoreBase from llama_index.vector_stores.l...
[ "lancedb.connect" ]
[((490, 503), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (501, 503), False, 'from dotenv import load_dotenv\n'), ((1464, 1492), 'os.getenv', 'os.getenv', (['"""LANCEDB_API_KEY"""'], {}), "('LANCEDB_API_KEY')\n", (1473, 1492), False, 'import os\n'), ((1520, 1547), 'os.getenv', 'os.getenv', (['"""LANCEDB_REGI...
from pathlib import Path from typing import Any, Callable from lancedb import DBConnection as LanceDBConnection from lancedb import connect as lancedb_connect from lancedb.table import Table as LanceDBTable from openai import Client as OpenAIClient from pydantic import Field, PrivateAttr from crewai_tools.tools.rag.r...
[ "lancedb.connect" ]
[((393, 407), 'openai.Client', 'OpenAIClient', ([], {}), '()\n', (405, 407), True, 'from openai import Client as OpenAIClient\n'), ((724, 774), 'pydantic.Field', 'Field', ([], {'default_factory': '_default_embedding_function'}), '(default_factory=_default_embedding_function)\n', (729, 774), False, 'from pydantic import...
import logging from typing import Any, Dict, Generator, List, Optional, Sequence, Tuple, Type import lancedb import pandas as pd from dotenv import load_dotenv from lancedb.pydantic import LanceModel, Vector from lancedb.query import LanceVectorQueryBuilder from pydantic import BaseModel, ValidationError, create_model...
[ "lancedb.pydantic.Vector", "lancedb.connect" ]
[((911, 938), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (928, 938), False, 'import logging\n'), ((1125, 1149), 'langroid.embedding_models.models.OpenAIEmbeddingsConfig', 'OpenAIEmbeddingsConfig', ([], {}), '()\n', (1147, 1149), False, 'from langroid.embedding_models.models import Ope...
import json import lancedb from lancedb.pydantic import Vector, LanceModel from datetime import datetime # import pyarrow as pa TABLE_NAME = "documents" uri = "data/sample-lancedb" db = lancedb.connect(uri) # vector: list of vectors # file_name: name of file # file_path: path of file # id # updated_at # created_at...
[ "lancedb.pydantic.Vector", "lancedb.connect" ]
[((189, 209), 'lancedb.connect', 'lancedb.connect', (['uri'], {}), '(uri)\n', (204, 209), False, 'import lancedb\n'), ((461, 472), 'lancedb.pydantic.Vector', 'Vector', (['(768)'], {}), '(768)\n', (467, 472), False, 'from lancedb.pydantic import Vector, LanceModel\n'), ((786, 800), 'datetime.datetime.now', 'datetime.now...
import json from sentence_transformers import SentenceTransformer from pydantic.main import ModelMetaclass from pathlib import Path import pandas as pd import sqlite3 from uuid import uuid4 import lancedb encoder = SentenceTransformer('all-MiniLM-L6-v2') data_folder = Path('data/collections') config_file = Path('data...
[ "lancedb.pydantic.Vector", "lancedb.connect" ]
[((216, 255), 'sentence_transformers.SentenceTransformer', 'SentenceTransformer', (['"""all-MiniLM-L6-v2"""'], {}), "('all-MiniLM-L6-v2')\n", (235, 255), False, 'from sentence_transformers import SentenceTransformer\n'), ((271, 295), 'pathlib.Path', 'Path', (['"""data/collections"""'], {}), "('data/collections')\n", (2...
import os import urllib.request import html2text import predictionguard as pg from langchain import PromptTemplate, FewShotPromptTemplate from langchain.text_splitter import CharacterTextSplitter from sentence_transformers import SentenceTransformer import numpy as np import lancedb from lancedb.embeddings i...
[ "lancedb.embeddings.with_embeddings", "lancedb.connect" ]
[((670, 691), 'html2text.HTML2Text', 'html2text.HTML2Text', ([], {}), '()\n', (689, 691), False, 'import html2text\n'), ((1001, 1056), 'langchain.text_splitter.CharacterTextSplitter', 'CharacterTextSplitter', ([], {'chunk_size': '(700)', 'chunk_overlap': '(50)'}), '(chunk_size=700, chunk_overlap=50)\n', (1022, 1056), F...
from lancedb.pydantic import LanceModel, Vector from lancedb.embeddings import EmbeddingFunctionRegistry registry = EmbeddingFunctionRegistry.get_instance() func = registry.get("openai").create() class Questions(LanceModel): question: str = func.SourceField() vector: Vector(func.ndims()) = func.VectorField()...
[ "lancedb.embeddings.EmbeddingFunctionRegistry.get_instance" ]
[((117, 157), 'lancedb.embeddings.EmbeddingFunctionRegistry.get_instance', 'EmbeddingFunctionRegistry.get_instance', ([], {}), '()\n', (155, 157), False, 'from lancedb.embeddings import EmbeddingFunctionRegistry\n')]
import logging import os import time from functools import wraps from pathlib import Path from random import random, seed import lancedb import pyarrow as pa import pyarrow.parquet as pq import typer from lancedb.db import LanceTable log_level = os.environ.get("LOG_LEVEL", "info") logging.basicConfig( level=getat...
[ "lancedb.connect" ]
[((248, 283), 'os.environ.get', 'os.environ.get', (['"""LOG_LEVEL"""', '"""info"""'], {}), "('LOG_LEVEL', 'info')\n", (262, 283), False, 'import os\n'), ((446, 473), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (463, 473), False, 'import logging\n'), ((480, 493), 'typer.Typer', 'typer.T...
import argparse import os import shutil from functools import lru_cache from pathlib import Path from typing import Any, Iterator import srsly from codetiming import Timer from config import Settings from dotenv import load_dotenv from rich import progress from schemas.wine import LanceModelWine, Wine from sentence_tr...
[ "lancedb.connect", "lancedb.pydantic.pydantic_to_schema" ]
[((455, 468), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (466, 468), False, 'from dotenv import load_dotenv\n'), ((560, 571), 'functools.lru_cache', 'lru_cache', ([], {}), '()\n', (569, 571), False, 'from functools import lru_cache\n'), ((668, 678), 'config.Settings', 'Settings', ([], {}), '()\n', (676, 678...
from datasets import load_dataset data = load_dataset('jamescalam/youtube-transcriptions', split='train') from lancedb.context import contextualize df = (contextualize(data.to_pandas()) .groupby("title").text_col("text") .window(20).stride(4) .to_df()) df.head(1) import openai import os # Configur...
[ "lancedb.connect" ]
[((42, 106), 'datasets.load_dataset', 'load_dataset', (['"""jamescalam/youtube-transcriptions"""'], {'split': '"""train"""'}), "('jamescalam/youtube-transcriptions', split='train')\n", (54, 106), False, 'from datasets import load_dataset\n'), ((831, 862), 'lancedb.connect', 'lancedb.connect', (['"""/tmp/lancedb"""'], {...
import hashlib import io import logging from typing import List import numpy as np from lancedb.pydantic import LanceModel, vector from PIL import Image from pydantic import BaseModel, Field, computed_field from homematch.config import IMAGES_DIR logger = logging.getLogger(__name__) class PropertyListingBase(BaseM...
[ "lancedb.pydantic.vector" ]
[((259, 286), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (276, 286), False, 'import logging\n'), ((2511, 2522), 'lancedb.pydantic.vector', 'vector', (['(768)'], {}), '(768)\n', (2517, 2522), False, 'from lancedb.pydantic import LanceModel, vector\n'), ((2146, 2158), 'io.BytesIO', 'io....
# Copyright 2023 LanceDB Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
[ "lancedb.remote.connection_timeout.LanceDBClientHTTPAdapterFactory", "lancedb.remote.VectorQueryResult", "lancedb.remote.errors.LanceDBClientError" ]
[((1587, 1612), 'attrs.define', 'attrs.define', ([], {'slots': '(False)'}), '(slots=False)\n', (1599, 1612), False, 'import attrs\n'), ((1207, 1225), 'functools.wraps', 'functools.wraps', (['f'], {}), '(f)\n', (1222, 1225), False, 'import functools\n'), ((1733, 1758), 'attrs.field', 'attrs.field', ([], {'default': 'Non...
from langchain.text_splitter import ( RecursiveCharacterTextSplitter, Language, LatexTextSplitter, ) from langchain.document_loaders import TextLoader from langchain.embeddings import OpenAIEmbeddings import argparse, os, arxiv os.environ["OPENAI_API_KEY"] = "sk-ORoaAljc5ylMsRwnXpLTT3BlbkFJQJz0esJOFYg8Z6...
[ "lancedb.pydantic.Vector", "lancedb.connect" ]
[((342, 360), 'langchain.embeddings.OpenAIEmbeddings', 'OpenAIEmbeddings', ([], {}), '()\n', (358, 360), False, 'from langchain.embeddings import OpenAIEmbeddings\n'), ((2116, 2133), 'lancedb.connect', 'lancedb.connect', ([], {}), '()\n', (2131, 2133), False, 'import lancedb\n'), ((2820, 2867), 'langchain.vectorstores....
import time import os import pandas as pd import streamlit as st import lancedb from lancedb.embeddings import with_embeddings from langchain import PromptTemplate import predictionguard as pg import streamlit as st import duckdb import re import numpy as np from sentence_transformers import SentenceTransformer #---...
[ "lancedb.connect" ]
[((413, 433), 'lancedb.connect', 'lancedb.connect', (['uri'], {}), '(uri)\n', (428, 433), False, 'import lancedb\n'), ((890, 947), 'streamlit.markdown', 'st.markdown', (['hide_streamlit_style'], {'unsafe_allow_html': '(True)'}), '(hide_streamlit_style, unsafe_allow_html=True)\n', (901, 947), True, 'import streamlit as ...
from FlagEmbedding import LLMEmbedder, FlagReranker import os import lancedb import re import pandas as pd import random from datasets import load_dataset import torch import gc import lance from lancedb.embeddings import with_embeddings task = "qa" # Encode for a specific task (qa, icl, chat, lrl...
[ "lancedb.embeddings.with_embeddings", "lancedb.connect" ]
[((356, 404), 'FlagEmbedding.LLMEmbedder', 'LLMEmbedder', (['"""BAAI/llm-embedder"""'], {'use_fp16': '(False)'}), "('BAAI/llm-embedder', use_fp16=False)\n", (367, 404), False, 'from FlagEmbedding import LLMEmbedder, FlagReranker\n'), ((463, 516), 'FlagEmbedding.FlagReranker', 'FlagReranker', (['"""BAAI/bge-reranker-bas...
import time import re import shutil import os import urllib import html2text import predictionguard as pg from langchain import PromptTemplate, FewShotPromptTemplate from langchain.text_splitter import CharacterTextSplitter from langchain.agents import load_tools from langchain.agents import initialize_agent from lang...
[ "lancedb.embeddings.with_embeddings", "lancedb.connect" ]
[((728, 820), 'langchain.PromptTemplate', 'PromptTemplate', ([], {'input_variables': "['user', 'assistant']", 'template': 'demo_formatter_template'}), "(input_variables=['user', 'assistant'], template=\n demo_formatter_template)\n", (742, 820), False, 'from langchain import PromptTemplate, FewShotPromptTemplate\n'),...
import logging from pathlib import Path from typing import Dict, Iterable, List, Optional, Union logger = logging.getLogger(__name__) from hamilton import contrib with contrib.catch_import_errors(__name__, __file__, logger): import pyarrow as pa import lancedb import numpy as np import pandas as pd ...
[ "lancedb.connect" ]
[((107, 134), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (124, 134), False, 'import logging\n'), ((1219, 1242), 'hamilton.function_modifiers.tag', 'tag', ([], {'side_effect': '"""True"""'}), "(side_effect='True')\n", (1222, 1242), False, 'from hamilton.function_modifiers import tag\n'...
# Copyright 2023 LanceDB Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
[ "lancedb.utils.general.TryExcept" ]
[((5422, 5446), 'lancedb.utils.general.TryExcept', 'TryExcept', ([], {'verbose': '(False)'}), '(verbose=False)\n', (5431, 5446), False, 'from lancedb.utils.general import TryExcept\n'), ((4584, 4595), 'time.time', 'time.time', ([], {}), '()\n', (4593, 4595), False, 'import time\n'), ((2567, 2598), 'platform.python_vers...
import argparse import os import sys from concurrent.futures import ProcessPoolExecutor, as_completed from functools import lru_cache from pathlib import Path from typing import Any, Iterator import lancedb import pandas as pd import srsly from codetiming import Timer from dotenv import load_dotenv from lancedb.pydant...
[ "lancedb.connect", "lancedb.pydantic.pydantic_to_schema" ]
[((580, 593), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (591, 593), False, 'from dotenv import load_dotenv\n'), ((685, 696), 'functools.lru_cache', 'lru_cache', ([], {}), '()\n', (694, 696), False, 'from functools import lru_cache\n'), ((793, 803), 'api.config.Settings', 'Settings', ([], {}), '()\n', (801,...
# Copyright 2023 LanceDB Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
[ "lancedb.remote.VectorQueryResult" ]
[((1402, 1427), 'attrs.define', 'attrs.define', ([], {'slots': '(False)'}), '(slots=False)\n', (1414, 1427), False, 'import attrs\n'), ((1006, 1024), 'functools.wraps', 'functools.wraps', (['f'], {}), '(f)\n', (1021, 1024), False, 'import functools\n'), ((1548, 1573), 'attrs.field', 'attrs.field', ([], {'default': 'Non...
import os import time import shutil import pandas as pd import lancedb from lancedb.embeddings import with_embeddings from langchain import PromptTemplate import predictionguard as pg import numpy as np from sentence_transformers import SentenceTransformer #---------------------# # Lance DB Setup # #-------------...
[ "lancedb.embeddings.with_embeddings", "lancedb.connect" ]
[((359, 391), 'pandas.read_csv', 'pd.read_csv', (['"""datasets/jobs.csv"""'], {}), "('datasets/jobs.csv')\n", (370, 391), True, 'import pandas as pd\n'), ((429, 463), 'pandas.read_csv', 'pd.read_csv', (['"""datasets/social.csv"""'], {}), "('datasets/social.csv')\n", (440, 463), True, 'import pandas as pd\n'), ((503, 53...
import typer import openai from rag_app.models import TextChunk from lancedb import connect from typing import List from pathlib import Path from rich.console import Console from rich.table import Table from rich import box import duckdb app = typer.Typer() @app.command(help="Query LanceDB for some results") def db(...
[ "lancedb.connect" ]
[((245, 258), 'typer.Typer', 'typer.Typer', ([], {}), '()\n', (256, 258), False, 'import typer\n'), ((340, 378), 'typer.Option', 'typer.Option', ([], {'help': '"""Your LanceDB path"""'}), "(help='Your LanceDB path')\n", (352, 378), False, 'import typer\n'), ((402, 448), 'typer.Option', 'typer.Option', ([], {'help': '""...
import typer from lancedb import connect from rag_app.models import TextChunk, Document from pathlib import Path from typing import Iterable from tqdm import tqdm from rich import print import frontmatter import hashlib from datetime import datetime from unstructured.partition.text import partition_text app = typer.Ty...
[ "lancedb.connect" ]
[((312, 325), 'typer.Typer', 'typer.Typer', ([], {}), '()\n', (323, 325), False, 'import typer\n'), ((1598, 1636), 'typer.Option', 'typer.Option', ([], {'help': '"""Your LanceDB path"""'}), "(help='Your LanceDB path')\n", (1610, 1636), False, 'import typer\n'), ((1660, 1706), 'typer.Option', 'typer.Option', ([], {'help...
# Copyright 2023 LanceDB Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
[ "lancedb.utils.CONFIG.copy", "lancedb.utils.CONFIG.update" ]
[((641, 654), 'click.group', 'click.group', ([], {}), '()\n', (652, 654), False, 'import click\n'), ((656, 727), 'click.version_option', 'click.version_option', ([], {'help': '"""LanceDB command line interface entry point"""'}), "(help='LanceDB command line interface entry point')\n", (676, 727), False, 'import click\n...
import json from sentence_transformers import SentenceTransformer from pydantic.main import ModelMetaclass from pathlib import Path import pandas as pd import sqlite3 from uuid import uuid4 import lancedb encoder = SentenceTransformer('all-MiniLM-L6-v2') data_folder = Path('data/collections') config_file = Path('data...
[ "lancedb.pydantic.Vector", "lancedb.connect" ]
[((216, 255), 'sentence_transformers.SentenceTransformer', 'SentenceTransformer', (['"""all-MiniLM-L6-v2"""'], {}), "('all-MiniLM-L6-v2')\n", (235, 255), False, 'from sentence_transformers import SentenceTransformer\n'), ((271, 295), 'pathlib.Path', 'Path', (['"""data/collections"""'], {}), "('data/collections')\n", (2...
import argparse import pandas as pd from unstructured.partition.pdf import partition_pdf import lancedb.embeddings.gte from lancedb.embeddings import get_registry from lancedb.pydantic import LanceModel, Vector def split_text_into_chunks(text, chunk_size, overlap): """ Split text into chunks with a specifie...
[ "lancedb.embeddings.get_registry" ]
[((1242, 1265), 'unstructured.partition.pdf.partition_pdf', 'partition_pdf', (['pdf_file'], {}), '(pdf_file)\n', (1255, 1265), False, 'from unstructured.partition.pdf import partition_pdf\n'), ((1658, 1688), 'pandas.DataFrame', 'pd.DataFrame', (["{'text': chunks}"], {}), "({'text': chunks})\n", (1670, 1688), True, 'imp...
import os import shutil from pathlib import Path import lancedb from lancedb.pydantic import LanceModel, Vector, pydantic_to_schema from langchain.document_loaders import TextLoader from langchain.embeddings import HuggingFaceEmbeddings from langchain.text_splitter import RecursiveCharacterTextSplitter from langchain....
[ "lancedb.pydantic.Vector", "lancedb.connect", "lancedb.pydantic.pydantic_to_schema" ]
[((429, 440), 'lancedb.pydantic.Vector', 'Vector', (['(384)'], {}), '(384)\n', (435, 440), False, 'from lancedb.pydantic import LanceModel, Vector, pydantic_to_schema\n'), ((538, 553), 'pathlib.Path', 'Path', (['"""../data"""'], {}), "('../data')\n", (542, 553), False, 'from pathlib import Path\n'), ((1650, 1714), 'lan...
import lancedb import uuid from datetime import datetime from tqdm import tqdm from typing import Optional, List, Iterator, Dict from memgpt.config import MemGPTConfig from memgpt.agent_store.storage import StorageConnector, TableType from memgpt.config import AgentConfig, MemGPTConfig from memgpt.constants import MEM...
[ "lancedb.pydantic.Vector" ]
[((623, 642), 'memgpt.config.MemGPTConfig.load', 'MemGPTConfig.load', ([], {}), '()\n', (640, 642), False, 'from memgpt.config import AgentConfig, MemGPTConfig\n'), ((1078, 1106), 'lancedb.pydantic.Vector', 'Vector', (['config.embedding_dim'], {}), '(config.embedding_dim)\n', (1084, 1106), False, 'from lancedb.pydantic...
import os import argparse import lancedb from lancedb.context import contextualize from lancedb.embeddings import with_embeddings from datasets import load_dataset import openai import pytest OPENAI_MODEL = None def embed_func(c): rs = openai.Embedding.create(input=c, engine=OPENAI_MODEL) return [record["emb...
[ "lancedb.embeddings.with_embeddings", "lancedb.connect" ]
[((243, 296), 'openai.Embedding.create', 'openai.Embedding.create', ([], {'input': 'c', 'engine': 'OPENAI_MODEL'}), '(input=c, engine=OPENAI_MODEL)\n', (266, 296), False, 'import openai\n'), ((1031, 1192), 'openai.Completion.create', 'openai.Completion.create', ([], {'engine': 'OPENAI_MODEL', 'prompt': 'prompt', 'tempe...
import os, time import pandas as pd import numpy as np from collections import Counter from .utils import abbreviate_book_name_in_full_reference, get_train_test_split_from_verse_list, embed_batch from .types import TranslationTriplet, ChatResponse, VerseMap, AIResponse from pydantic import BaseModel, Field from typing ...
[ "lancedb.embeddings.with_embeddings", "lancedb.connect" ]
[((559, 587), 'logging.getLogger', 'logging.getLogger', (['"""uvicorn"""'], {}), "('uvicorn')\n", (576, 587), False, 'import logging\n'), ((801, 880), 'pandas.read_csv', 'pd.read_csv', (['"""data/bsb-utf8.txt"""'], {'sep': '"""\t"""', 'names': "['vref', 'content']", 'header': '(0)'}), "('data/bsb-utf8.txt', sep='\\t', ...
import logging import pyarrow as pa import pyarrow.compute as pc from tabulate import tabulate from llama_cpp import Llama from dryg.settings import DEFAULT_MODEL from dryg.db import open_table, create_table from lancedb.embeddings import with_embeddings MODEL = None def get_code_blocks(body: pa.ChunkedArray): ...
[ "lancedb.embeddings.with_embeddings" ]
[((1527, 1575), 'lancedb.embeddings.with_embeddings', 'with_embeddings', (['embedding_func', 'issues', '"""title"""'], {}), "(embedding_func, issues, 'title')\n", (1542, 1575), False, 'from lancedb.embeddings import with_embeddings\n'), ((1611, 1662), 'dryg.db.create_table', 'create_table', (['issue_table', 'issues'], ...
from pathlib import Path from collections import defaultdict import math import json import pandas as pd import cv2 import duckdb import matplotlib.pyplot as plt import numpy as np import yaml from tqdm import tqdm from ultralytics.utils import LOGGER, colorstr from ultralytics.utils.plotting import Annotator, colors ...
[ "lancedb.embeddings.with_embeddings", "lancedb.connect" ]
[((1044, 1064), 'cv2.imread', 'cv2.imread', (['img_path'], {}), '(img_path)\n', (1054, 1064), False, 'import cv2\n'), ((1214, 1249), 'numpy.frombuffer', 'np.frombuffer', (['img_encoded', 'np.byte'], {}), '(img_encoded, np.byte)\n', (1227, 1249), True, 'import numpy as np\n'), ((1260, 1300), 'cv2.imdecode', 'cv2.imdecod...
""" Run this script to benchmark the serial search performance of FTS and vector search """ import argparse import random from functools import lru_cache from pathlib import Path from typing import Any from codetiming import Timer from config import Settings from rich import progress from schemas.wine import SearchRes...
[ "lancedb.connect" ]
[((471, 482), 'functools.lru_cache', 'lru_cache', ([], {}), '()\n', (480, 482), False, 'from functools import lru_cache\n'), ((579, 589), 'config.Settings', 'Settings', ([], {}), '()\n', (587, 589), False, 'from config import Settings\n'), ((2943, 2968), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '...
from neumai.Shared.NeumSinkInfo import NeumSinkInfo from neumai.Shared.NeumVector import NeumVector from neumai.Shared.NeumSearch import NeumSearchResult from neumai.Shared.Exceptions import( LanceDBInsertionException, LanceDBIndexInfoException, LanceDBIndexCreationException, LanceDBQueryException ) fr...
[ "lancedb.connect" ]
[((2397, 2447), 'pydantic.Field', 'Field', (['...'], {'description': '"""URI for LanceDB database"""'}), "(..., description='URI for LanceDB database')\n", (2402, 2447), False, 'from pydantic import Field\n'), ((2477, 2537), 'pydantic.Field', 'Field', ([], {'default': 'None', 'description': '"""API key for LanceDB clou...
from FlagEmbedding import LLMEmbedder, FlagReranker import lancedb import re import pandas as pd import random from datasets import load_dataset import torch import gc from lancedb.embeddings import with_embeddings embed_model = LLMEmbedder( "BAAI/llm-embedder", use_fp16=False ) # Load model (automatically use...
[ "lancedb.embeddings.with_embeddings", "lancedb.connect" ]
[((233, 281), 'FlagEmbedding.LLMEmbedder', 'LLMEmbedder', (['"""BAAI/llm-embedder"""'], {'use_fp16': '(False)'}), "('BAAI/llm-embedder', use_fp16=False)\n", (244, 281), False, 'from FlagEmbedding import LLMEmbedder, FlagReranker\n'), ((344, 397), 'FlagEmbedding.FlagReranker', 'FlagReranker', (['"""BAAI/bge-reranker-bas...
import os import urllib.request import shutil import html2text import predictionguard as pg from langchain import PromptTemplate, FewShotPromptTemplate from langchain.text_splitter import CharacterTextSplitter from sentence_transformers import SentenceTransformer import numpy as np import lancedb from lancedb.embedding...
[ "lancedb.embeddings.with_embeddings", "lancedb.connect" ]
[((657, 678), 'html2text.HTML2Text', 'html2text.HTML2Text', ([], {}), '()\n', (676, 678), False, 'import html2text\n'), ((847, 902), 'langchain.text_splitter.CharacterTextSplitter', 'CharacterTextSplitter', ([], {'chunk_size': '(700)', 'chunk_overlap': '(50)'}), '(chunk_size=700, chunk_overlap=50)\n', (868, 902), False...
import json import logging from typing import Any, Dict, Generator, List, Optional, Sequence, Set, Tuple, Type import lancedb import pandas as pd from dotenv import load_dotenv from lancedb.pydantic import LanceModel, Vector from lancedb.query import LanceVectorQueryBuilder from pydantic import BaseModel, ValidationEr...
[ "lancedb.pydantic.Vector", "lancedb.connect" ]
[((877, 904), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (894, 904), False, 'import logging\n'), ((1067, 1091), 'src.embedding_models.models.OpenAIEmbeddingsConfig', 'OpenAIEmbeddingsConfig', ([], {}), '()\n', (1089, 1091), False, 'from src.embedding_models.models import OpenAIEmbeddi...
from datasets import load_dataset import os import lancedb import getpass import time import argparse from tqdm.auto import tqdm from lancedb.embeddings import EmbeddingFunctionRegistry from lancedb.pydantic import LanceModel, Vector def main(query=None): if "COHERE_API_KEY" not in os.environ: os.environ[...
[ "lancedb.embeddings.EmbeddingFunctionRegistry", "lancedb.connect" ]
[((407, 463), 'datasets.load_dataset', 'load_dataset', (['"""wikipedia"""', '"""20220301.en"""'], {'streaming': '(True)'}), "('wikipedia', '20220301.en', streaming=True)\n", (419, 463), False, 'from datasets import load_dataset\n'), ((504, 560), 'datasets.load_dataset', 'load_dataset', (['"""wikipedia"""', '"""20220301...
from typing import Optional from pydantic import BaseModel, ConfigDict, Field, model_validator from lancedb.pydantic import LanceModel, Vector class Wine(BaseModel): model_config = ConfigDict( populate_by_name=True, validate_assignment=True, extra="allow", str_strip_whitespace=Tr...
[ "lancedb.pydantic.Vector" ]
[((189, 894), 'pydantic.ConfigDict', 'ConfigDict', ([], {'populate_by_name': '(True)', 'validate_assignment': '(True)', 'extra': '"""allow"""', 'str_strip_whitespace': '(True)', 'json_schema_extra': "{'example': {'id': 45100, 'points': 85, 'title':\n 'Balduzzi 2012 Reserva Merlot (Maule Valley)', 'description':\n ...
from typing import Any from lancedb.embeddings import EmbeddingFunctionRegistry def register_model(model_name: str) -> Any: """ Register a model with the given name using LanceDB's EmbeddingFunctionRegistry. Args: model_name (str): The name of the model to register. Returns: model: ...
[ "lancedb.embeddings.EmbeddingFunctionRegistry.get_instance" ]
[((430, 470), 'lancedb.embeddings.EmbeddingFunctionRegistry.get_instance', 'EmbeddingFunctionRegistry.get_instance', ([], {}), '()\n', (468, 470), False, 'from lancedb.embeddings import EmbeddingFunctionRegistry\n')]
#!/usr/bin/env python import os import lancedb from lancedb.embeddings import with_embeddings import openai import pandas as pd from pydantic import BaseModel, Field import requests from aifunctools.openai_funcs import complete_with_functions openai.api_key = os.getenv("OPENAI_API_KEY") MODEL = "gpt-3.5-turbo-16k-0...
[ "lancedb.embeddings.with_embeddings", "lancedb.connect" ]
[((263, 290), 'os.getenv', 'os.getenv', (['"""OPENAI_API_KEY"""'], {}), "('OPENAI_API_KEY')\n", (272, 290), False, 'import os\n'), ((331, 358), 'lancedb.connect', 'lancedb.connect', (['""".lancedb"""'], {}), "('.lancedb')\n", (346, 358), False, 'import lancedb\n'), ((389, 454), 'openai.Embedding.create', 'openai.Embedd...
import lancedb import uuid from datetime import datetime from tqdm import tqdm from typing import Optional, List, Iterator, Dict from memgpt.config import MemGPTConfig from memgpt.connectors.storage import StorageConnector, TableType from memgpt.config import AgentConfig, MemGPTConfig from memgpt.constants import MEMG...
[ "lancedb.pydantic.Vector" ]
[((622, 641), 'memgpt.config.MemGPTConfig.load', 'MemGPTConfig.load', ([], {}), '()\n', (639, 641), False, 'from memgpt.config import AgentConfig, MemGPTConfig\n'), ((1077, 1105), 'lancedb.pydantic.Vector', 'Vector', (['config.embedding_dim'], {}), '(config.embedding_dim)\n', (1083, 1105), False, 'from lancedb.pydantic...
""" Install lancedb with instructor embedding support copy this and paste it in the terminal, and install additional dependencies via requirements.txt file pip install git+https://github.com/lancedb/lancedb.git@main#subdirectory=python """ import lancedb from lancedb.pydantic import LanceModel, Vecto...
[ "lancedb.connect", "lancedb.embeddings.get_registry" ]
[((818, 847), 'lancedb.connect', 'lancedb.connect', (['"""~/.lancedb"""'], {}), "('~/.lancedb')\n", (833, 847), False, 'import lancedb\n'), ((445, 459), 'lancedb.embeddings.get_registry', 'get_registry', ([], {}), '()\n', (457, 459), False, 'from lancedb.embeddings import get_registry\n')]
from pathlib import Path from uuid import uuid4 from langchain.document_loaders import TextLoader from langchain.embeddings.openai import OpenAIEmbeddings from langchain.text_splitter import CharacterTextSplitter from langchain.vectorstores import LanceDB import lancedb from knowledge_graph.configuration.config import...
[ "lancedb.connect" ]
[((410, 438), 'lancedb.connect', 'lancedb.connect', (['cfg.db_path'], {}), '(cfg.db_path)\n', (425, 438), False, 'import lancedb\n'), ((715, 743), 'lancedb.connect', 'lancedb.connect', (['cfg.db_path'], {}), '(cfg.db_path)\n', (730, 743), False, 'import lancedb\n'), ((1060, 1125), 'langchain.text_splitter.CharacterText...
from glob import glob from os.path import basename from pathlib import Path import chromadb import lancedb import pandas as pd import torch from chromadb.utils import embedding_functions from lancedb.embeddings import EmbeddingFunctionRegistry from lancedb.pydantic import LanceModel, Vector from loguru import logger f...
[ "lancedb.connect", "lancedb.embeddings.EmbeddingFunctionRegistry.get_instance" ]
[((489, 529), 'lancedb.embeddings.EmbeddingFunctionRegistry.get_instance', 'EmbeddingFunctionRegistry.get_instance', ([], {}), '()\n', (527, 529), False, 'from lancedb.embeddings import EmbeddingFunctionRegistry\n'), ((881, 915), 'chromadb.PersistentClient', 'chromadb.PersistentClient', (['DB_PATH'], {}), '(DB_PATH)\n'...
import getpass from typing import List import cv2 import numpy as np import pandas as pd from ultralytics.data.augment import LetterBox from ultralytics.utils import LOGGER as logger from ultralytics.utils import SETTINGS from ultralytics.utils.checks import check_requirements from ultralytics.utils.ops import xyxy2x...
[ "lancedb.pydantic.Vector" ]
[((3411, 3433), 'numpy.stack', 'np.stack', (['imgs'], {'axis': '(0)'}), '(imgs, axis=0)\n', (3419, 3433), True, 'import numpy as np\n'), ((3771, 3804), 'numpy.concatenate', 'np.concatenate', (['batch_idx'], {'axis': '(0)'}), '(batch_idx, axis=0)\n', (3785, 3804), True, 'import numpy as np\n'), ((4239, 4274), 'ultralyti...
# Ultralytics YOLO ๐Ÿš€, AGPL-3.0 license import getpass from typing import List import cv2 import numpy as np import pandas as pd from ultralytics.data.augment import LetterBox from ultralytics.utils import LOGGER as logger from ultralytics.utils import SETTINGS from ultralytics.utils.checks import check_requirements...
[ "lancedb.pydantic.Vector" ]
[((3694, 3716), 'numpy.stack', 'np.stack', (['imgs'], {'axis': '(0)'}), '(imgs, axis=0)\n', (3702, 3716), True, 'import numpy as np\n'), ((4054, 4087), 'numpy.concatenate', 'np.concatenate', (['batch_idx'], {'axis': '(0)'}), '(batch_idx, axis=0)\n', (4068, 4087), True, 'import numpy as np\n'), ((4421, 4456), 'ultralyti...
from typing import Optional from lancedb.pydantic import Vector from pydantic import BaseModel, ConfigDict, Field, model_validator class Wine(BaseModel): model_config = ConfigDict( populate_by_name=True, validate_assignment=True, extra="allow", str_strip_whitespace=True, j...
[ "lancedb.pydantic.Vector" ]
[((176, 881), 'pydantic.ConfigDict', 'ConfigDict', ([], {'populate_by_name': '(True)', 'validate_assignment': '(True)', 'extra': '"""allow"""', 'str_strip_whitespace': '(True)', 'json_schema_extra': "{'example': {'id': 45100, 'points': 85, 'title':\n 'Balduzzi 2012 Reserva Merlot (Maule Valley)', 'description':\n ...
# Ultralytics YOLO ๐Ÿš€, AGPL-3.0 license import getpass from typing import List import cv2 import numpy as np import pandas as pd from engine.data.augment import LetterBox from engine.utils import LOGGER as logger from engine.utils import SETTINGS from engine.utils.checks import check_requirements from engine.utils.o...
[ "lancedb.pydantic.Vector" ]
[((3664, 3686), 'numpy.stack', 'np.stack', (['imgs'], {'axis': '(0)'}), '(imgs, axis=0)\n', (3672, 3686), True, 'import numpy as np\n'), ((3997, 4030), 'numpy.concatenate', 'np.concatenate', (['batch_idx'], {'axis': '(0)'}), '(batch_idx, axis=0)\n', (4011, 4030), True, 'import numpy as np\n'), ((4364, 4399), 'engine.ut...
import json import lancedb import pytest from lancedb.utils.events import _Events @pytest.fixture(autouse=True) def request_log_path(tmp_path): return tmp_path / "request.json" def mock_register_event(name: str, **kwargs): if _Events._instance is None: _Events._instance = _Events() _Events._in...
[ "lancedb.utils.events._Events._instance", "lancedb.connect", "lancedb.utils.events._Events" ]
[((86, 114), 'pytest.fixture', 'pytest.fixture', ([], {'autouse': '(True)'}), '(autouse=True)\n', (100, 114), False, 'import pytest\n'), ((383, 416), 'lancedb.utils.events._Events._instance', '_Events._instance', (['name'], {}), '(name, **kwargs)\n', (400, 416), False, 'from lancedb.utils.events import _Events\n'), ((8...
# Ultralytics YOLO ๐Ÿš€, AGPL-3.0 license import getpass from typing import List import cv2 import numpy as np import pandas as pd from ultralytics.data.augment import LetterBox from ultralytics.utils import LOGGER as logger from ultralytics.utils import SETTINGS from ultralytics.utils.checks import check_requirements...
[ "lancedb.pydantic.Vector" ]
[((3694, 3716), 'numpy.stack', 'np.stack', (['imgs'], {'axis': '(0)'}), '(imgs, axis=0)\n', (3702, 3716), True, 'import numpy as np\n'), ((4027, 4060), 'numpy.concatenate', 'np.concatenate', (['batch_idx'], {'axis': '(0)'}), '(batch_idx, axis=0)\n', (4041, 4060), True, 'import numpy as np\n'), ((4394, 4429), 'ultralyti...
# Ultralytics YOLO ๐Ÿš€, AGPL-3.0 license import getpass from typing import List import cv2 import numpy as np import pandas as pd from ultralytics.data.augment import LetterBox from ultralytics.utils import LOGGER as logger from ultralytics.utils import SETTINGS from ultralytics.utils.checks import check_requirements...
[ "lancedb.pydantic.Vector" ]
[((3694, 3716), 'numpy.stack', 'np.stack', (['imgs'], {'axis': '(0)'}), '(imgs, axis=0)\n', (3702, 3716), True, 'import numpy as np\n'), ((4027, 4060), 'numpy.concatenate', 'np.concatenate', (['batch_idx'], {'axis': '(0)'}), '(batch_idx, axis=0)\n', (4041, 4060), True, 'import numpy as np\n'), ((4394, 4429), 'ultralyti...
# Ultralytics YOLO ๐Ÿš€, AGPL-3.0 license import getpass from typing import List import cv2 import numpy as np import pandas as pd from ultralytics.data.augment import LetterBox from ultralytics.utils import LOGGER as logger from ultralytics.utils import SETTINGS from ultralytics.utils.checks import check_requirements...
[ "lancedb.pydantic.Vector" ]
[((3694, 3716), 'numpy.stack', 'np.stack', (['imgs'], {'axis': '(0)'}), '(imgs, axis=0)\n', (3702, 3716), True, 'import numpy as np\n'), ((4027, 4060), 'numpy.concatenate', 'np.concatenate', (['batch_idx'], {'axis': '(0)'}), '(batch_idx, axis=0)\n', (4041, 4060), True, 'import numpy as np\n'), ((4394, 4429), 'ultralyti...
# Ultralytics YOLO ๐Ÿš€, AGPL-3.0 license import getpass from typing import List import cv2 import numpy as np import pandas as pd from ultralytics.data.augment import LetterBox from ultralytics.utils import LOGGER as logger from ultralytics.utils import SETTINGS from ultralytics.utils.checks import check_requirements...
[ "lancedb.pydantic.Vector" ]
[((3694, 3716), 'numpy.stack', 'np.stack', (['imgs'], {'axis': '(0)'}), '(imgs, axis=0)\n', (3702, 3716), True, 'import numpy as np\n'), ((4027, 4060), 'numpy.concatenate', 'np.concatenate', (['batch_idx'], {'axis': '(0)'}), '(batch_idx, axis=0)\n', (4041, 4060), True, 'import numpy as np\n'), ((4394, 4429), 'ultralyti...
"""LanceDB vector store with cloud storage support.""" import os from typing import Any, Optional from dotenv import load_dotenv from llama_index.schema import NodeRelationship, RelatedNodeInfo, TextNode from llama_index.vector_stores import LanceDBVectorStore as LanceDBVectorStoreBase from llama_index.vector_stores.l...
[ "lancedb.connect" ]
[((490, 503), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (501, 503), False, 'from dotenv import load_dotenv\n'), ((1464, 1492), 'os.getenv', 'os.getenv', (['"""LANCEDB_API_KEY"""'], {}), "('LANCEDB_API_KEY')\n", (1473, 1492), False, 'import os\n'), ((1520, 1547), 'os.getenv', 'os.getenv', (['"""LANCEDB_REGI...
from pathlib import Path from typing import Any, Callable from lancedb import DBConnection as LanceDBConnection from lancedb import connect as lancedb_connect from lancedb.table import Table as LanceDBTable from openai import Client as OpenAIClient from pydantic import Field, PrivateAttr from crewai_tools.tools.rag.r...
[ "lancedb.connect" ]
[((393, 407), 'openai.Client', 'OpenAIClient', ([], {}), '()\n', (405, 407), True, 'from openai import Client as OpenAIClient\n'), ((724, 774), 'pydantic.Field', 'Field', ([], {'default_factory': '_default_embedding_function'}), '(default_factory=_default_embedding_function)\n', (729, 774), False, 'from pydantic import...
from langchain.text_splitter import ( RecursiveCharacterTextSplitter, Language, LatexTextSplitter, ) from langchain.document_loaders import TextLoader from langchain.embeddings import OpenAIEmbeddings import argparse, os, arxiv os.environ["OPENAI_API_KEY"] = "sk-ORoaAljc5ylMsRwnXpLTT3BlbkFJQJz0esJOFYg8Z6...
[ "lancedb.pydantic.Vector", "lancedb.connect" ]
[((342, 360), 'langchain.embeddings.OpenAIEmbeddings', 'OpenAIEmbeddings', ([], {}), '()\n', (358, 360), False, 'from langchain.embeddings import OpenAIEmbeddings\n'), ((2116, 2133), 'lancedb.connect', 'lancedb.connect', ([], {}), '()\n', (2131, 2133), False, 'import lancedb\n'), ((2820, 2867), 'langchain.vectorstores....
# Ultralytics YOLO ๐Ÿš€, AGPL-3.0 license import getpass from typing import List import cv2 import numpy as np import pandas as pd from ultralytics.data.augment import LetterBox from ultralytics.utils import LOGGER as logger from ultralytics.utils import SETTINGS from ultralytics.utils.checks import check_requirements...
[ "lancedb.pydantic.Vector" ]
[((3694, 3716), 'numpy.stack', 'np.stack', (['imgs'], {'axis': '(0)'}), '(imgs, axis=0)\n', (3702, 3716), True, 'import numpy as np\n'), ((4054, 4087), 'numpy.concatenate', 'np.concatenate', (['batch_idx'], {'axis': '(0)'}), '(batch_idx, axis=0)\n', (4068, 4087), True, 'import numpy as np\n'), ((4421, 4456), 'ultralyti...
# Ultralytics YOLO ๐Ÿš€, AGPL-3.0 license import getpass from typing import List import cv2 import numpy as np import pandas as pd from ultralytics.data.augment import LetterBox from ultralytics.utils import LOGGER as logger from ultralytics.utils import SETTINGS from ultralytics.utils.checks import check_requirements...
[ "lancedb.pydantic.Vector" ]
[((3694, 3716), 'numpy.stack', 'np.stack', (['imgs'], {'axis': '(0)'}), '(imgs, axis=0)\n', (3702, 3716), True, 'import numpy as np\n'), ((4054, 4087), 'numpy.concatenate', 'np.concatenate', (['batch_idx'], {'axis': '(0)'}), '(batch_idx, axis=0)\n', (4068, 4087), True, 'import numpy as np\n'), ((4421, 4456), 'ultralyti...
import os import argparse import lancedb from lancedb.context import contextualize from lancedb.embeddings import with_embeddings from datasets import load_dataset import openai import pytest import subprocess from main import embed_func, create_prompt, complete # DOWNLOAD =============================================...
[ "lancedb.embeddings.with_embeddings", "lancedb.connect" ]
[((1071, 1184), 'argparse.Namespace', 'argparse.Namespace', ([], {'query': '"""test"""', 'context_length': '(3)', 'window_size': '(20)', 'stride': '(4)', 'openai_key': '"""test"""', 'model': '"""test"""'}), "(query='test', context_length=3, window_size=20, stride=4,\n openai_key='test', model='test')\n", (1089, 1184...
# Copyright 2023 LanceDB Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
[ "lancedb.embeddings.EmbeddingFunctionRegistry.get_instance", "lancedb.conftest.MockTextEmbeddingFunction", "lancedb.db.LanceDBConnection", "lancedb.embeddings.EmbeddingFunctionConfig", "lancedb.table.LanceTable", "lancedb.pydantic.Vector", "lancedb.connect", "lancedb.table.LanceTable.create" ]
[((1992, 2014), 'lancedb.table.LanceTable', 'LanceTable', (['db', '"""test"""'], {}), "(db, 'test')\n", (2002, 2014), False, 'from lancedb.table import LanceTable\n'), ((3907, 3928), 'pandas.DataFrame', 'pd.DataFrame', (['data[0]'], {}), '(data[0])\n', (3919, 3928), True, 'import pandas as pd\n'), ((4450, 4494), 'lance...
# Copyright 2023 LanceDB Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
[ "lancedb.remote.connection_timeout.LanceDBClientHTTPAdapterFactory", "lancedb.remote.VectorQueryResult", "lancedb.remote.errors.LanceDBClientError" ]
[((1587, 1612), 'attrs.define', 'attrs.define', ([], {'slots': '(False)'}), '(slots=False)\n', (1599, 1612), False, 'import attrs\n'), ((1207, 1225), 'functools.wraps', 'functools.wraps', (['f'], {}), '(f)\n', (1222, 1225), False, 'import functools\n'), ((1733, 1758), 'attrs.field', 'attrs.field', ([], {'default': 'Non...
# Copyright 2023 LanceDB Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
[ "lancedb.pydantic.Vector", "lancedb.pydantic.pydantic_to_schema" ]
[((860, 973), 'pytest.mark.skipif', 'pytest.mark.skipif', (['(sys.version_info < (3, 9))'], {'reason': '"""using native type alias requires python3.9 or higher"""'}), "(sys.version_info < (3, 9), reason=\n 'using native type alias requires python3.9 or higher')\n", (878, 973), False, 'import pytest\n'), ((2877, 2988...
# Copyright 2023 LanceDB Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
[ "lancedb.pydantic.Vector", "lancedb.query.LanceVectorQueryBuilder", "lancedb.query.Query", "lancedb.db.LanceDBConnection" ]
[((2041, 2074), 'lance.write_dataset', 'lance.write_dataset', (['df', 'tmp_path'], {}), '(df, tmp_path)\n', (2060, 2074), False, 'import lance\n'), ((4585, 4625), 'pandas.testing.assert_frame_equal', 'tm.assert_frame_equal', (['df_default', 'df_l2'], {}), '(df_default, df_l2)\n', (4606, 4625), True, 'import pandas.test...
# Copyright (c) 2023. LanceDB Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
[ "lancedb.connect", "lancedb.embeddings.get_registry" ]
[((1288, 1357), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""alias"""', "['sentence-transformers', 'openai']"], {}), "('alias', ['sentence-transformers', 'openai'])\n", (1311, 1357), False, 'import pytest\n'), ((5687, 5773), 'pytest.mark.skipif', 'pytest.mark.skipif', (['(_imagebind is None)'], {'reason'...
# Copyright 2023 LanceDB Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
[ "lancedb.connect", "lancedb.remote.client.VectorQueryResult" ]
[((1101, 1164), 'lancedb.connect', 'lancedb.connect', (['"""db://client-will-be-injected"""'], {'api_key': '"""fake"""'}), "('db://client-will-be-injected', api_key='fake')\n", (1116, 1164), False, 'import lancedb\n'), ((924, 944), 'lancedb.remote.client.VectorQueryResult', 'VectorQueryResult', (['t'], {}), '(t)\n', (9...
# Copyright 2023 LanceDB Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
[ "lancedb.embeddings.EmbeddingFunctionRegistry.get_instance", "lancedb.embeddings.registry.get_registry", "lancedb.conftest.MockTextEmbeddingFunction", "lancedb.embeddings.registry.register", "lancedb.embeddings.with_embeddings", "lancedb.connect" ]
[((1948, 1988), 'lancedb.embeddings.EmbeddingFunctionRegistry.get_instance', 'EmbeddingFunctionRegistry.get_instance', ([], {}), '()\n', (1986, 1988), False, 'from lancedb.embeddings import EmbeddingFunctionConfig, EmbeddingFunctionRegistry, with_embeddings\n'), ((2476, 2527), 'lance.write_dataset', 'lance.write_datase...
# Copyright 2023 LanceDB Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
[ "lancedb.utils.general.TryExcept" ]
[((5466, 5490), 'lancedb.utils.general.TryExcept', 'TryExcept', ([], {'verbose': '(False)'}), '(verbose=False)\n', (5475, 5490), False, 'from lancedb.utils.general import TryExcept\n'), ((4628, 4639), 'time.time', 'time.time', ([], {}), '()\n', (4637, 4639), False, 'import time\n'), ((2579, 2610), 'platform.python_vers...
# Copyright 2023 LanceDB Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
[ "lancedb.pydantic.Vector", "lancedb.connect", "lancedb.connect_async" ]
[((807, 832), 'lancedb.connect', 'lancedb.connect', (['tmp_path'], {}), '(tmp_path)\n', (822, 832), False, 'import lancedb\n'), ((1559, 1584), 'lancedb.connect', 'lancedb.connect', (['tmp_path'], {}), '(tmp_path)\n', (1574, 1584), False, 'import lancedb\n'), ((1667, 1769), 'pandas.DataFrame', 'pd.DataFrame', (["{'vecto...