code
stringlengths
193
97.3k
apis
listlengths
1
8
extract_api
stringlengths
113
214k
# 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...
# type: ignore 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.cons...
[ "lancedb.pydantic.Vector" ]
[((639, 658), 'memgpt.config.MemGPTConfig.load', 'MemGPTConfig.load', ([], {}), '()\n', (656, 658), False, 'from memgpt.config import AgentConfig, MemGPTConfig\n'), ((1094, 1147), 'lancedb.pydantic.Vector', 'Vector', (['config.default_embedding_config.embedding_dim'], {}), '(config.default_embedding_config.embedding_di...
# 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.connect", "lancedb.embeddings.with_embeddings" ]
[((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'), (...
import lancedb import lancedb.embeddings.imagebind from lancedb.embeddings import get_registry from lancedb.pydantic import LanceModel, Vector import gradio as gr from downloader import dowload_and_save_audio, dowload_and_save_image, base_path model = get_registry().get("imagebind").create() class TextModel(LanceMod...
[ "lancedb.connect", "lancedb.embeddings.get_registry" ]
[((550, 574), 'downloader.dowload_and_save_image', 'dowload_and_save_image', ([], {}), '()\n', (572, 574), False, 'from downloader import dowload_and_save_audio, dowload_and_save_image, base_path\n'), ((589, 613), 'downloader.dowload_and_save_audio', 'dowload_and_save_audio', ([], {}), '()\n', (611, 613), False, 'from ...
"""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.connect", "lancedb.pydantic.Vector" ]
[((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.connect", "lancedb.pydantic.Vector" ]
[((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.connect", "lancedb.pydantic.Vector" ]
[((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.connect", "lancedb.embeddings.with_embeddings" ]
[((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')]
""" ---------Parameters to be changed between different devices---------- 1. Models and directory 2. Input and output directory 3. Device selection (CPU/GPU) - LINE 46 AND 300 Reference: 1. similarity_search_by_vector(): https://python.langchain.com/docs/modules/data_connection/vectorstores/ 2. LanceDB Code do...
[ "lancedb.connect", "lancedb.embeddings.EmbeddingFunctionRegistry.get_instance" ]
[((1778, 1818), 'lancedb.embeddings.EmbeddingFunctionRegistry.get_instance', 'EmbeddingFunctionRegistry.get_instance', ([], {}), '()\n', (1816, 1818), False, 'from lancedb.embeddings import EmbeddingFunctionRegistry\n'), ((15779, 15819), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.ERROR'}), '(...
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.VectorQueryResult", "lancedb.remote.connection_timeout.LanceDBClientHTTPAdapterFactory", "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.connect", "lancedb.pydantic.Vector" ]
[((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....
# 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" ]
[((5469, 5493), 'lancedb.utils.general.TryExcept', 'TryExcept', ([], {'verbose': '(False)'}), '(verbose=False)\n', (5478, 5493), False, 'from lancedb.utils.general import TryExcept\n'), ((4631, 4642), 'time.time', 'time.time', ([], {}), '()\n', (4640, 4642), False, 'import time\n'), ((2582, 2613), 'platform.python_vers...
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.connect", "lancedb.embeddings.with_embeddings" ]
[((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...
# 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.events.register_event", "lancedb.embeddings.registry.EmbeddingFunctionRegistry.get_instance", "lancedb.common.data_to_reader", "lancedb.common.validate_schema" ]
[((24504, 24527), 'lancedb.common.validate_schema', 'validate_schema', (['schema'], {}), '(schema)\n', (24519, 24527), False, 'from lancedb.common import data_to_reader, validate_schema\n'), ((25026, 25056), 'lancedb.utils.events.register_event', 'register_event', (['"""create_table"""'], {}), "('create_table')\n", (25...
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.connect", "lancedb.embeddings.with_embeddings" ]
[((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 from typing import List, Dict, Optional, Any from dataclasses import dataclass, field from .preprocessor import call_pdf_preprocess, call_image_preprocess, call_audio_preprocess from .utils.semantic_chuncker import SemanticChunker from .utils.txt_preprocessor import NERExtractor from langchain_openai.em...
[ "lancedb.connect", "lancedb.embeddings.EmbeddingFunctionRegistry" ]
[((801, 855), 'dataclasses.field', 'field', ([], {'default_factory': "(lambda : ['txt', 'csv', 'json'])"}), "(default_factory=lambda : ['txt', 'csv', 'json'])\n", (806, 855), False, 'from dataclasses import dataclass, field\n'), ((877, 916), 'dataclasses.field', 'field', ([], {'default_factory': "(lambda : ['pdf'])"}),...
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.connect", "lancedb.embeddings.with_embeddings" ]
[((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.connect", "lancedb.pydantic.Vector" ]
[((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...
from datetime import datetime from typing import List, Union from pydantic import field_validator from lancedb.embeddings import get_registry from lancedb.pydantic import LanceModel, Vector from pydantic import BaseModel openai = get_registry().get("openai").create(name="text-embedding-3-large", dim=256) class TextC...
[ "lancedb.embeddings.get_registry" ]
[((671, 698), 'pydantic.field_validator', 'field_validator', (['"""metadata"""'], {}), "('metadata')\n", (686, 698), False, 'from pydantic import field_validator\n'), ((1082, 1109), 'pydantic.field_validator', 'field_validator', (['"""metadata"""'], {}), "('metadata')\n", (1097, 1109), False, 'from pydantic import fiel...
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.connect", "lancedb.pydantic.Vector", "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 zipfile import numpy as np import pandas as pd import scipy.sparse import torch import implicit from implicit import evaluation import lancedb import pydantic from lancedb.pydantic import pydantic_to_schema, vector import argparse def products_bought_by_user_in_the_past(user_id: int, top: int = 10): select...
[ "lancedb.connect", "lancedb.pydantic.vector", "lancedb.pydantic.pydantic_to_schema" ]
[((774, 832), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Product Recommender"""'}), "(description='Product Recommender')\n", (797, 832), False, 'import argparse\n'), ((2049, 2076), 'pandas.read_csv', 'pd.read_csv', (['"""products.csv"""'], {}), "('products.csv')\n", (2060, 2076), Tru...
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.connect", "lancedb.embeddings.with_embeddings" ]
[((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.connect", "lancedb.embeddings.with_embeddings" ]
[((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.connect", "lancedb.embeddings.with_embeddings" ]
[((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.connect", "lancedb.embeddings.with_embeddings" ]
[((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.connect", "lancedb.embeddings.with_embeddings" ]
[((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.connect", "lancedb.pydantic.Vector" ]
[((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.connect", "lancedb.embeddings.EmbeddingFunctionRegistry" ]
[((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.connect", "lancedb.embeddings.with_embeddings" ]
[((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.connect", "lancedb.utils.events._Events", "lancedb.utils.events._Events._instance" ]
[((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...
import os import lancedb import numpy as np import pytest from lancedb.conftest import MockTextEmbeddingFunction # noqa from lancedb.embeddings import EmbeddingFunctionRegistry from lancedb.pydantic import LanceModel, Vector from lancedb.rerankers import ( CohereReranker, ColbertReranker, CrossEncoderRera...
[ "lancedb.rerankers.ColbertReranker", "lancedb.connect", "lancedb.rerankers.CohereReranker", "lancedb.rerankers.CrossEncoderReranker", "lancedb.table.LanceTable.create", "lancedb.rerankers.OpenaiReranker", "lancedb.embeddings.EmbeddingFunctionRegistry.get_instance" ]
[((412, 446), 'pytest.importorskip', 'pytest.importorskip', (['"""lancedb.fts"""'], {}), "('lancedb.fts')\n", (431, 446), False, 'import pytest\n'), ((488, 513), 'lancedb.connect', 'lancedb.connect', (['tmp_path'], {}), '(tmp_path)\n', (503, 513), False, 'import lancedb\n'), ((830, 879), 'lancedb.table.LanceTable.creat...
# 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.LanceDBConnection" ]
[((707, 763), 'pytest.mark.skip', 'pytest.mark.skip', ([], {'reason': '"""Need to set up a local server"""'}), "(reason='Need to set up a local server')\n", (723, 763), False, 'import pytest\n'), ((808, 859), 'lancedb.LanceDBConnection', 'LanceDBConnection', (['"""lancedb+http://localhost:10024"""'], {}), "('lancedb+ht...
# 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...
# 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.connect", "lancedb.embeddings.with_embeddings" ]
[((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...
"""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.connect", "lancedb.pydantic.Vector" ]
[((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...
from click.testing import CliRunner from lancedb.cli.cli import cli from lancedb.utils import CONFIG def test_entry(): runner = CliRunner() result = runner.invoke(cli) assert result.exit_code == 0 # Main check assert "lancedb" in result.output.lower() # lazy check def test_diagnostics(): runne...
[ "lancedb.utils.CONFIG.copy" ]
[((134, 145), 'click.testing.CliRunner', 'CliRunner', ([], {}), '()\n', (143, 145), False, 'from click.testing import CliRunner\n'), ((324, 335), 'click.testing.CliRunner', 'CliRunner', ([], {}), '()\n', (333, 335), False, 'from click.testing import CliRunner\n'), ((660, 671), 'click.testing.CliRunner', 'CliRunner', ([...
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.connect", "lancedb.embeddings.with_embeddings" ]
[((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...
from datetime import timedelta import pyarrow as pa import pytest import pytest_asyncio from lancedb import AsyncConnection, AsyncTable, connect_async from lancedb.index import BTree, IvfPq @pytest_asyncio.fixture async def db_async(tmp_path) -> AsyncConnection: return await connect_async(tmp_path, read_consiste...
[ "lancedb.index.IvfPq", "lancedb.index.BTree" ]
[((495, 546), 'pyarrow.FixedSizeListArray.from_arrays', 'pa.FixedSizeListArray.from_arrays', (['vector_data', 'dim'], {}), '(vector_data, dim)\n', (528, 546), True, 'import pyarrow as pa\n'), ((470, 482), 'pyarrow.float32', 'pa.float32', ([], {}), '()\n', (480, 482), True, 'import pyarrow as pa\n'), ((1303, 1354), 'pyt...
# 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.conftest.MockTextEmbeddingFunction", "lancedb.table.LanceTable", "lancedb.connect", "lancedb.table.LanceTable.create", "lancedb.db.LanceDBConnection", "lancedb.embeddings.EmbeddingFunctionConfig", "lancedb.embeddings.EmbeddingFunctionRegistry.get_instance" ]
[((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.VectorQueryResult", "lancedb.remote.connection_timeout.LanceDBClientHTTPAdapterFactory", "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.Query", "lancedb.query.LanceVectorQueryBuilder", "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.context.contextualize" ]
[((726, 911), 'pandas.DataFrame', 'pd.DataFrame', (["{'token': ['The', 'quick', 'brown', 'fox', 'jumped', 'over', 'the', 'lazy',\n 'dog', 'I', 'love', 'sandwiches'], 'document_id': [1, 1, 1, 1, 1, 1, 1,\n 1, 1, 2, 2, 2]}"], {}), "({'token': ['The', 'quick', 'brown', 'fox', 'jumped', 'over',\n 'the', 'lazy', 'd...
# 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.registry.register", "lancedb.conftest.MockTextEmbeddingFunction", "lancedb.connect", "lancedb.embeddings.with_embeddings", "lancedb.embeddings.registry.get_registry", "lancedb.embeddings.EmbeddingFunctionRegistry.get_instance" ]
[((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.util.join_uri", "lancedb.util.get_uri_scheme" ]
[((1561, 1634), 'pytest.mark.skipif', 'pytest.mark.skipif', (["(os.name == 'nt')"], {'reason': '"""Windows paths are not POSIX"""'}), "(os.name == 'nt', reason='Windows paths are not POSIX')\n", (1579, 1634), False, 'import pytest\n'), ((2201, 2274), 'pytest.mark.skipif', 'pytest.mark.skipif', (["(os.name != 'nt')"], {...
# 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.remote.client.RestfulLanceDBClient" ]
[((2188, 2239), 'pytest.mark.skip', 'pytest.mark.skip', ([], {'reason': '"""flaky somehow, fix later"""'}), "(reason='flaky somehow, fix later')\n", (2204, 2239), False, 'import pytest\n'), ((839, 862), 'attrs.field', 'attrs.field', ([], {'init': '(False)'}), '(init=False)\n', (850, 862), False, 'import attrs\n'), ((88...
# 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.pydantic.Vector", "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...
# Ultralytics YOLO 🚀, AGPL-3.0 license from io import BytesIO from pathlib import Path from typing import Any, List, Tuple, Union import cv2 import numpy as np import torch from PIL import Image from matplotlib import pyplot as plt from pandas import DataFrame from tqdm import tqdm from ultralytics.data.augment imp...
[ "lancedb.connect" ]
[((1697, 1890), 'ultralytics.data.augment.Format', 'Format', ([], {'bbox_format': '"""xyxy"""', 'normalize': '(False)', 'return_mask': 'self.use_segments', 'return_keypoint': 'self.use_keypoints', 'batch_idx': '(True)', 'mask_ratio': 'hyp.mask_ratio', 'mask_overlap': 'hyp.overlap_mask'}), "(bbox_format='xyxy', normaliz...
import logging import lancedb from langchain.chains import RetrievalQA from langchain.document_loaders import TextLoader from langchain.embeddings import HuggingFaceEmbeddings from langchain.llms import CTransformers from langchain.prompts import PromptTemplate from langchain.text_splitter import RecursiveCharacterTex...
[ "lancedb.connect" ]
[((400, 496), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO', 'format': '"""%(asctime)s - %(levelname)s - %(message)s"""'}), "(level=logging.INFO, format=\n '%(asctime)s - %(levelname)s - %(message)s')\n", (419, 496), False, 'import logging\n'), ((501, 528), 'logging.getLogger', 'logging...
from collections import OrderedDict from typing import List, Optional import lancedb import pandas as pd import pyarrow as pa from lance.vector import vec_to_table import duckdb import json from mindsdb.integrations.libs.const import HANDLER_CONNECTION_ARG_TYPE as ARG_TYPE from mindsdb.integrations.libs.response impo...
[ "lancedb.connect" ]
[((752, 775), 'mindsdb.utilities.log.getLogger', 'log.getLogger', (['__name__'], {}), '(__name__)\n', (765, 775), False, 'from mindsdb.utilities import log\n'), ((13628, 14162), 'collections.OrderedDict', 'OrderedDict', ([], {'persist_directory': "{'type': ARG_TYPE.STR, 'description': 'The uri of the database.',\n '...
"""Vector store.""" from langchain.vectorstores import LanceDB import lancedb class VectorStoreLanceDB: """Vector store lance DB.""" def __init__(self, db_path, table_name, mode, embedding_model): self.db = lancedb.connect(db_path) self.embedding_model = embedding_model print(db_path...
[ "lancedb.connect" ]
[((226, 250), 'lancedb.connect', 'lancedb.connect', (['db_path'], {}), '(db_path)\n', (241, 250), False, 'import lancedb\n'), ((1608, 1681), 'langchain.vectorstores.LanceDB', 'LanceDB', ([], {'connection': 'table', 'embedding': 'self.embedding_model.embedding_model'}), '(connection=table, embedding=self.embedding_model...
import os from dotenv import load_dotenv import streamlit as st from langchain.llms import OpenAI from langchain.chat_models import ChatOpenAI from langchain.embeddings.openai import OpenAIEmbeddings from langchain.text_splitter import RecursiveCharacterTextSplitter from langchain.chains import ConversationalRetrievalC...
[ "lancedb.connect" ]
[((924, 983), 'streamlit.set_page_config', 'st.set_page_config', ([], {'page_title': '"""GlobeBotter"""', 'page_icon': '"""🎬"""'}), "(page_title='GlobeBotter', page_icon='🎬')\n", (942, 983), True, 'import streamlit as st\n'), ((984, 1055), 'streamlit.header', 'st.header', (['"""🎬 Welcome to MovieHarbor, your favouri...
from pathlib import Path import geopandas as gpd import lancedb import matplotlib.pyplot as plt from skimage import io # Set working directory wd = "/home/usr/Desktop/" # To download the existing embeddings run aws s3 sync # aws s3 sync s3://clay-worldcover-embeddings /my/dir/clay-worldcover-embeddings vector_dir =...
[ "lancedb.connect" ]
[((321, 371), 'pathlib.Path', 'Path', (["(wd + 'clay-worldcover-embeddings/v002/2021/')"], {}), "(wd + 'clay-worldcover-embeddings/v002/2021/')\n", (325, 371), False, 'from pathlib import Path\n'), ((421, 468), 'lancedb.connect', 'lancedb.connect', (["(wd + 'worldcoverembeddings_db')"], {}), "(wd + 'worldcoverembedding...
# Copyright 2023 llmware # 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 in writing, software #...
[ "lancedb.connect" ]
[((12701, 12771), 'llmware.resources.CollectionRetrieval', 'CollectionRetrieval', (['self.library_name'], {'account_name': 'self.account_name'}), '(self.library_name, account_name=self.account_name)\n', (12720, 12771), False, 'from llmware.resources import CollectionRetrieval, CollectionWriter\n'), ((13147, 13217), 'll...
"""LanceDB vector store.""" import logging from typing import Any, List, Optional import numpy as np from llama_index.core.bridge.pydantic import PrivateAttr from llama_index.core.schema import ( BaseNode, MetadataMode, NodeRelationship, RelatedNodeInfo, TextNode, ) from llama_index.core.vector_st...
[ "lancedb.connect" ]
[((685, 712), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (702, 712), False, 'import logging\n'), ((2814, 2827), 'llama_index.core.bridge.pydantic.PrivateAttr', 'PrivateAttr', ([], {}), '()\n', (2825, 2827), False, 'from llama_index.core.bridge.pydantic import PrivateAttr\n'), ((3431, ...
# Copyright [2024] [Holosun ApS] # # 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" ]
[((1190, 1215), 'os.getenv', 'os.getenv', (['"""SUPABASE_URL"""'], {}), "('SUPABASE_URL')\n", (1199, 1215), False, 'import os\n'), ((1239, 1264), 'os.getenv', 'os.getenv', (['"""SUPABASE_KEY"""'], {}), "('SUPABASE_KEY')\n", (1248, 1264), False, 'import os\n'), ((1376, 1417), 'supabase.create_client', 'create_client', (...
import uuid from ragna.core import Config, Document, PackageRequirement, Requirement, Source from ._vector_database import VectorDatabaseSourceStorage class LanceDB(VectorDatabaseSourceStorage): """[LanceDB vector database](https://lancedb.com/) !!! info "Required packages" - `chromadb>=0.4.13` ...
[ "lancedb.connect" ]
[((892, 944), 'lancedb.connect', 'lancedb.connect', (["(config.local_cache_root / 'lancedb')"], {}), "(config.local_cache_root / 'lancedb')\n", (907, 944), False, 'import lancedb\n'), ((503, 537), 'ragna.core.PackageRequirement', 'PackageRequirement', (['"""lancedb>=0.2"""'], {}), "('lancedb>=0.2')\n", (521, 537), Fals...