code stringlengths 161 233k | apis listlengths 1 24 | extract_api stringlengths 162 68.5k |
|---|---|---|
import os
from argparse import Namespace, _SubParsersAction
from llama_index import SimpleDirectoryReader
from .configuration import load_index, save_index
def add_cli(args: Namespace) -> None:
"""Handle subcommand "add"."""
index = load_index()
for p in args.files:
if not os.path.exists(p):
... | [
"llama_index.SimpleDirectoryReader"
] | [((368, 384), 'os.path.isdir', 'os.path.isdir', (['p'], {}), '(p)\n', (381, 384), False, 'import os\n'), ((299, 316), 'os.path.exists', 'os.path.exists', (['p'], {}), '(p)\n', (313, 316), False, 'import os\n'), ((410, 434), 'llama_index.SimpleDirectoryReader', 'SimpleDirectoryReader', (['p'], {}), '(p)\n', (431, 434), ... |
import os
from argparse import Namespace, _SubParsersAction
from llama_index import SimpleDirectoryReader
from .configuration import load_index, save_index
def add_cli(args: Namespace) -> None:
"""Handle subcommand "add"."""
index = load_index()
for p in args.files:
if not os.path.exists(p):
... | [
"llama_index.SimpleDirectoryReader"
] | [((368, 384), 'os.path.isdir', 'os.path.isdir', (['p'], {}), '(p)\n', (381, 384), False, 'import os\n'), ((299, 316), 'os.path.exists', 'os.path.exists', (['p'], {}), '(p)\n', (313, 316), False, 'import os\n'), ((410, 434), 'llama_index.SimpleDirectoryReader', 'SimpleDirectoryReader', (['p'], {}), '(p)\n', (431, 434), ... |
import os
from argparse import Namespace, _SubParsersAction
from llama_index import SimpleDirectoryReader
from .configuration import load_index, save_index
def add_cli(args: Namespace) -> None:
"""Handle subcommand "add"."""
index = load_index()
for p in args.files:
if not os.path.exists(p):
... | [
"llama_index.SimpleDirectoryReader"
] | [((368, 384), 'os.path.isdir', 'os.path.isdir', (['p'], {}), '(p)\n', (381, 384), False, 'import os\n'), ((299, 316), 'os.path.exists', 'os.path.exists', (['p'], {}), '(p)\n', (313, 316), False, 'import os\n'), ((410, 434), 'llama_index.SimpleDirectoryReader', 'SimpleDirectoryReader', (['p'], {}), '(p)\n', (431, 434), ... |
import os
from argparse import Namespace, _SubParsersAction
from llama_index import SimpleDirectoryReader
from .configuration import load_index, save_index
def add_cli(args: Namespace) -> None:
"""Handle subcommand "add"."""
index = load_index()
for p in args.files:
if not os.path.exists(p):
... | [
"llama_index.SimpleDirectoryReader"
] | [((368, 384), 'os.path.isdir', 'os.path.isdir', (['p'], {}), '(p)\n', (381, 384), False, 'import os\n'), ((299, 316), 'os.path.exists', 'os.path.exists', (['p'], {}), '(p)\n', (313, 316), False, 'import os\n'), ((410, 434), 'llama_index.SimpleDirectoryReader', 'SimpleDirectoryReader', (['p'], {}), '(p)\n', (431, 434), ... |
from typing import Dict, List, Type
from llama_index.agent import OpenAIAgent, ReActAgent
from llama_index.agent.types import BaseAgent
from llama_index.llms import Anthropic, OpenAI
from llama_index.llms.llama_utils import messages_to_prompt
from llama_index.llms.llm import LLM
from llama_index.llms.replicate import ... | [
"llama_index.llms.Anthropic",
"llama_index.llms.OpenAI",
"llama_index.llms.replicate.Replicate"
] | [((1116, 1135), 'llama_index.llms.OpenAI', 'OpenAI', ([], {'model': 'model'}), '(model=model)\n', (1122, 1135), False, 'from llama_index.llms import Anthropic, OpenAI\n'), ((1186, 1208), 'llama_index.llms.Anthropic', 'Anthropic', ([], {'model': 'model'}), '(model=model)\n', (1195, 1208), False, 'from llama_index.llms i... |
from typing import Dict, List, Type
from llama_index.agent import OpenAIAgent, ReActAgent
from llama_index.agent.types import BaseAgent
from llama_index.llms import Anthropic, OpenAI
from llama_index.llms.llama_utils import messages_to_prompt
from llama_index.llms.llm import LLM
from llama_index.llms.replicate import ... | [
"llama_index.llms.Anthropic",
"llama_index.llms.OpenAI",
"llama_index.llms.replicate.Replicate"
] | [((1116, 1135), 'llama_index.llms.OpenAI', 'OpenAI', ([], {'model': 'model'}), '(model=model)\n', (1122, 1135), False, 'from llama_index.llms import Anthropic, OpenAI\n'), ((1186, 1208), 'llama_index.llms.Anthropic', 'Anthropic', ([], {'model': 'model'}), '(model=model)\n', (1195, 1208), False, 'from llama_index.llms i... |
from typing import Dict, List, Type
from llama_index.agent import OpenAIAgent, ReActAgent
from llama_index.agent.types import BaseAgent
from llama_index.llms import Anthropic, OpenAI
from llama_index.llms.llama_utils import messages_to_prompt
from llama_index.llms.llm import LLM
from llama_index.llms.replicate import ... | [
"llama_index.llms.Anthropic",
"llama_index.llms.OpenAI",
"llama_index.llms.replicate.Replicate"
] | [((1116, 1135), 'llama_index.llms.OpenAI', 'OpenAI', ([], {'model': 'model'}), '(model=model)\n', (1122, 1135), False, 'from llama_index.llms import Anthropic, OpenAI\n'), ((1186, 1208), 'llama_index.llms.Anthropic', 'Anthropic', ([], {'model': 'model'}), '(model=model)\n', (1195, 1208), False, 'from llama_index.llms i... |
import asyncio
import os
import shutil
from argparse import ArgumentParser
from glob import iglob
from pathlib import Path
from typing import Any, Callable, Dict, Optional, Union, cast
from llama_index.core import (
SimpleDirectoryReader,
VectorStoreIndex,
)
from llama_index.core.base.embeddings.base import Ba... | [
"llama_index.llms.openai.OpenAI",
"llama_index.core.bridge.pydantic.validator",
"llama_index.core.VectorStoreIndex.from_vector_store",
"llama_index.core.indices.service_context.ServiceContext.from_defaults",
"llama_index.core.bridge.pydantic.Field",
"llama_index.core.query_pipeline.components.function.FnC... | [((1789, 1840), 'llama_index.core.bridge.pydantic.Field', 'Field', ([], {'description': '"""Query Pipeline to use for Q&A."""'}), "(description='Query Pipeline to use for Q&A.')\n", (1794, 1840), False, 'from llama_index.core.bridge.pydantic import BaseModel, Field, validator\n'), ((2284, 2349), 'llama_index.core.bridg... |
import asyncio
import os
import shutil
from argparse import ArgumentParser
from glob import iglob
from pathlib import Path
from typing import Any, Callable, Dict, Optional, Union, cast
from llama_index.core import (
SimpleDirectoryReader,
VectorStoreIndex,
)
from llama_index.core.base.embeddings.base import Ba... | [
"llama_index.llms.openai.OpenAI",
"llama_index.core.bridge.pydantic.validator",
"llama_index.core.VectorStoreIndex.from_vector_store",
"llama_index.core.indices.service_context.ServiceContext.from_defaults",
"llama_index.core.bridge.pydantic.Field",
"llama_index.core.query_pipeline.components.function.FnC... | [((1789, 1840), 'llama_index.core.bridge.pydantic.Field', 'Field', ([], {'description': '"""Query Pipeline to use for Q&A."""'}), "(description='Query Pipeline to use for Q&A.')\n", (1794, 1840), False, 'from llama_index.core.bridge.pydantic import BaseModel, Field, validator\n'), ((2284, 2349), 'llama_index.core.bridg... |
from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, Callable, List, Optional
if TYPE_CHECKING:
from llama_index.core.service_context import ServiceContext
from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.core.callbacks.base import BaseCallbackHandler, Callback... | [
"llama_index.core.llms.utils.resolve_llm",
"llama_index.core.utils.get_tokenizer",
"llama_index.core.indices.prompt_helper.PromptHelper.from_llm_metadata",
"llama_index.core.embeddings.utils.resolve_embed_model",
"llama_index.core.node_parser.SentenceSplitter",
"llama_index.core.callbacks.base.CallbackMan... | [((1701, 1717), 'llama_index.core.llms.utils.resolve_llm', 'resolve_llm', (['llm'], {}), '(llm)\n', (1712, 1717), False, 'from llama_index.core.llms.utils import LLMType, resolve_llm\n'), ((2647, 2679), 'llama_index.core.embeddings.utils.resolve_embed_model', 'resolve_embed_model', (['embed_model'], {}), '(embed_model)... |
from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, Callable, List, Optional
if TYPE_CHECKING:
from llama_index.core.service_context import ServiceContext
from llama_index.core.base.embeddings.base import BaseEmbedding
from llama_index.core.callbacks.base import BaseCallbackHandler, Callback... | [
"llama_index.core.llms.utils.resolve_llm",
"llama_index.core.utils.get_tokenizer",
"llama_index.core.indices.prompt_helper.PromptHelper.from_llm_metadata",
"llama_index.core.embeddings.utils.resolve_embed_model",
"llama_index.core.node_parser.SentenceSplitter",
"llama_index.core.callbacks.base.CallbackMan... | [((1701, 1717), 'llama_index.core.llms.utils.resolve_llm', 'resolve_llm', (['llm'], {}), '(llm)\n', (1712, 1717), False, 'from llama_index.core.llms.utils import LLMType, resolve_llm\n'), ((2647, 2679), 'llama_index.core.embeddings.utils.resolve_embed_model', 'resolve_embed_model', (['embed_model'], {}), '(embed_model)... |
import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core import VectorStoreIndex
async def main():
# DOWNLOAD LLAMADATASET
rag_dataset, documents = download_llama_dataset("CovidQaDataset", "./data")
... | [
"llama_index.core.VectorStoreIndex.from_documents",
"llama_index.core.llama_dataset.download_llama_dataset",
"llama_index.core.llama_pack.download_llama_pack"
] | [((265, 315), 'llama_index.core.llama_dataset.download_llama_dataset', 'download_llama_dataset', (['"""CovidQaDataset"""', '"""./data"""'], {}), "('CovidQaDataset', './data')\n", (287, 315), False, 'from llama_index.core.llama_dataset import download_llama_dataset\n'), ((360, 412), 'llama_index.core.VectorStoreIndex.fr... |
import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core import VectorStoreIndex
async def main():
# DOWNLOAD LLAMADATASET
rag_dataset, documents = download_llama_dataset("CovidQaDataset", "./data")
... | [
"llama_index.core.VectorStoreIndex.from_documents",
"llama_index.core.llama_dataset.download_llama_dataset",
"llama_index.core.llama_pack.download_llama_pack"
] | [((265, 315), 'llama_index.core.llama_dataset.download_llama_dataset', 'download_llama_dataset', (['"""CovidQaDataset"""', '"""./data"""'], {}), "('CovidQaDataset', './data')\n", (287, 315), False, 'from llama_index.core.llama_dataset import download_llama_dataset\n'), ((360, 412), 'llama_index.core.VectorStoreIndex.fr... |
from typing import Any, Callable, Optional, Sequence
from llama_index.core.base.llms.types import (
ChatMessage,
CompletionResponse,
CompletionResponseGen,
LLMMetadata,
)
from llama_index.core.callbacks import CallbackManager
from llama_index.core.llms.callbacks import llm_completion_callback
from llam... | [
"llama_index.core.llms.callbacks.llm_completion_callback",
"llama_index.core.base.llms.types.LLMMetadata",
"llama_index.core.base.llms.types.CompletionResponse"
] | [((1532, 1557), 'llama_index.core.llms.callbacks.llm_completion_callback', 'llm_completion_callback', ([], {}), '()\n', (1555, 1557), False, 'from llama_index.core.llms.callbacks import llm_completion_callback\n'), ((1871, 1896), 'llama_index.core.llms.callbacks.llm_completion_callback', 'llm_completion_callback', ([],... |
from typing import Any, Callable, Optional, Sequence
from llama_index.core.base.llms.types import (
ChatMessage,
CompletionResponse,
CompletionResponseGen,
LLMMetadata,
)
from llama_index.core.callbacks import CallbackManager
from llama_index.core.llms.callbacks import llm_completion_callback
from llam... | [
"llama_index.core.llms.callbacks.llm_completion_callback",
"llama_index.core.base.llms.types.LLMMetadata",
"llama_index.core.base.llms.types.CompletionResponse"
] | [((1532, 1557), 'llama_index.core.llms.callbacks.llm_completion_callback', 'llm_completion_callback', ([], {}), '()\n', (1555, 1557), False, 'from llama_index.core.llms.callbacks import llm_completion_callback\n'), ((1871, 1896), 'llama_index.core.llms.callbacks.llm_completion_callback', 'llm_completion_callback', ([],... |
from typing import Any, Callable, Optional, Sequence
from llama_index.core.base.llms.types import (
ChatMessage,
CompletionResponse,
CompletionResponseGen,
LLMMetadata,
)
from llama_index.core.callbacks import CallbackManager
from llama_index.core.llms.callbacks import llm_completion_callback
from llam... | [
"llama_index.core.llms.callbacks.llm_completion_callback",
"llama_index.core.base.llms.types.LLMMetadata",
"llama_index.core.base.llms.types.CompletionResponse"
] | [((1532, 1557), 'llama_index.core.llms.callbacks.llm_completion_callback', 'llm_completion_callback', ([], {}), '()\n', (1555, 1557), False, 'from llama_index.core.llms.callbacks import llm_completion_callback\n'), ((1871, 1896), 'llama_index.core.llms.callbacks.llm_completion_callback', 'llm_completion_callback', ([],... |
"""Base agent type."""
import uuid
from abc import abstractmethod
from typing import Any, Dict, List, Optional
from llama_index.core.base.base_query_engine import BaseQueryEngine
from llama_index.core.base.llms.types import ChatMessage
from llama_index.core.base.response.schema import RESPONSE_TYPE, Response
from lla... | [
"llama_index.core.bridge.pydantic.Field",
"llama_index.core.callbacks.trace_method"
] | [((1275, 1296), 'llama_index.core.callbacks.trace_method', 'trace_method', (['"""query"""'], {}), "('query')\n", (1287, 1296), False, 'from llama_index.core.callbacks import CallbackManager, trace_method\n'), ((1598, 1619), 'llama_index.core.callbacks.trace_method', 'trace_method', (['"""query"""'], {}), "('query')\n",... |
"""Base agent type."""
import uuid
from abc import abstractmethod
from typing import Any, Dict, List, Optional
from llama_index.core.base.base_query_engine import BaseQueryEngine
from llama_index.core.base.llms.types import ChatMessage
from llama_index.core.base.response.schema import RESPONSE_TYPE, Response
from lla... | [
"llama_index.core.bridge.pydantic.Field",
"llama_index.core.callbacks.trace_method"
] | [((1275, 1296), 'llama_index.core.callbacks.trace_method', 'trace_method', (['"""query"""'], {}), "('query')\n", (1287, 1296), False, 'from llama_index.core.callbacks import CallbackManager, trace_method\n'), ((1598, 1619), 'llama_index.core.callbacks.trace_method', 'trace_method', (['"""query"""'], {}), "('query')\n",... |
"""Base agent type."""
import uuid
from abc import abstractmethod
from typing import Any, Dict, List, Optional
from llama_index.core.base.base_query_engine import BaseQueryEngine
from llama_index.core.base.llms.types import ChatMessage
from llama_index.core.base.response.schema import RESPONSE_TYPE, Response
from lla... | [
"llama_index.core.bridge.pydantic.Field",
"llama_index.core.callbacks.trace_method"
] | [((1275, 1296), 'llama_index.core.callbacks.trace_method', 'trace_method', (['"""query"""'], {}), "('query')\n", (1287, 1296), False, 'from llama_index.core.callbacks import CallbackManager, trace_method\n'), ((1598, 1619), 'llama_index.core.callbacks.trace_method', 'trace_method', (['"""query"""'], {}), "('query')\n",... |
import json
from abc import abstractmethod
from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, Dict, Optional, Type
if TYPE_CHECKING:
from llama_index.core.bridge.langchain import StructuredTool, Tool
from deprecated import deprecated
from llama_index.core.bridge.pydantic import BaseModel
cl... | [
"llama_index.core.bridge.langchain.Tool.from_function",
"llama_index.core.bridge.langchain.StructuredTool.from_function"
] | [((1581, 1670), 'deprecated.deprecated', 'deprecated', (['"""Deprecated in favor of `to_openai_tool`, which should be used instead."""'], {}), "(\n 'Deprecated in favor of `to_openai_tool`, which should be used instead.')\n", (1591, 1670), False, 'from deprecated import deprecated\n'), ((1395, 1417), 'json.dumps', '... |
import json
from abc import abstractmethod
from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, Dict, Optional, Type
if TYPE_CHECKING:
from llama_index.core.bridge.langchain import StructuredTool, Tool
from deprecated import deprecated
from llama_index.core.bridge.pydantic import BaseModel
cl... | [
"llama_index.core.bridge.langchain.Tool.from_function",
"llama_index.core.bridge.langchain.StructuredTool.from_function"
] | [((1581, 1670), 'deprecated.deprecated', 'deprecated', (['"""Deprecated in favor of `to_openai_tool`, which should be used instead."""'], {}), "(\n 'Deprecated in favor of `to_openai_tool`, which should be used instead.')\n", (1591, 1670), False, 'from deprecated import deprecated\n'), ((1395, 1417), 'json.dumps', '... |
import json
from abc import abstractmethod
from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, Dict, Optional, Type
if TYPE_CHECKING:
from llama_index.core.bridge.langchain import StructuredTool, Tool
from deprecated import deprecated
from llama_index.core.bridge.pydantic import BaseModel
cl... | [
"llama_index.core.bridge.langchain.Tool.from_function",
"llama_index.core.bridge.langchain.StructuredTool.from_function"
] | [((1581, 1670), 'deprecated.deprecated', 'deprecated', (['"""Deprecated in favor of `to_openai_tool`, which should be used instead."""'], {}), "(\n 'Deprecated in favor of `to_openai_tool`, which should be used instead.')\n", (1591, 1670), False, 'from deprecated import deprecated\n'), ((1395, 1417), 'json.dumps', '... |
"""Generate SQL queries using LlamaIndex."""
import argparse
import json
import logging
import os
import re
from typing import Any, cast
from llama_index import LLMPredictor, SQLDatabase
from llama_index.indices import SQLStructStoreIndex
from llama_index.llms.openai import OpenAI
from sqlalchemy import create_engine,... | [
"llama_index.llms.openai.OpenAI",
"llama_index.indices.SQLStructStoreIndex.from_documents",
"llama_index.SQLDatabase",
"llama_index.LLMPredictor"
] | [((413, 431), 're.compile', 're.compile', (['"""\\\\s+"""'], {}), "('\\\\s+')\n", (423, 431), False, 'import re\n'), ((444, 462), 're.compile', 're.compile', (['"""\\\\n+"""'], {}), "('\\\\n+')\n", (454, 462), False, 'import re\n'), ((1926, 2003), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description... |
"""Generate SQL queries using LlamaIndex."""
import argparse
import json
import logging
import os
import re
from typing import Any, cast
from llama_index import LLMPredictor, SQLDatabase
from llama_index.indices import SQLStructStoreIndex
from llama_index.llms.openai import OpenAI
from sqlalchemy import create_engine,... | [
"llama_index.llms.openai.OpenAI",
"llama_index.indices.SQLStructStoreIndex.from_documents",
"llama_index.SQLDatabase",
"llama_index.LLMPredictor"
] | [((413, 431), 're.compile', 're.compile', (['"""\\\\s+"""'], {}), "('\\\\s+')\n", (423, 431), False, 'import re\n'), ((444, 462), 're.compile', 're.compile', (['"""\\\\n+"""'], {}), "('\\\\n+')\n", (454, 462), False, 'import re\n'), ((1926, 2003), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description... |
"""Utilities for Spider module."""
import json
import os
from typing import Dict, Tuple
from llama_index import LLMPredictor, SQLDatabase
from llama_index.indices import SQLStructStoreIndex
from llama_index.llms.openai import OpenAI
from sqlalchemy import create_engine, text
def load_examples(spider_dir: str) -> Tu... | [
"llama_index.indices.SQLStructStoreIndex",
"llama_index.SQLDatabase",
"llama_index.LLMPredictor"
] | [((1447, 1468), 'llama_index.LLMPredictor', 'LLMPredictor', ([], {'llm': 'llm'}), '(llm=llm)\n', (1459, 1468), False, 'from llama_index import LLMPredictor, SQLDatabase\n'), ((452, 464), 'json.load', 'json.load', (['f'], {}), '(f)\n', (461, 464), False, 'import json\n'), ((555, 567), 'json.load', 'json.load', (['f'], {... |
"""Utilities for Spider module."""
import json
import os
from typing import Dict, Tuple
from llama_index import LLMPredictor, SQLDatabase
from llama_index.indices import SQLStructStoreIndex
from llama_index.llms.openai import OpenAI
from sqlalchemy import create_engine, text
def load_examples(spider_dir: str) -> Tu... | [
"llama_index.indices.SQLStructStoreIndex",
"llama_index.SQLDatabase",
"llama_index.LLMPredictor"
] | [((1447, 1468), 'llama_index.LLMPredictor', 'LLMPredictor', ([], {'llm': 'llm'}), '(llm=llm)\n', (1459, 1468), False, 'from llama_index import LLMPredictor, SQLDatabase\n'), ((452, 464), 'json.load', 'json.load', (['f'], {}), '(f)\n', (461, 464), False, 'import json\n'), ((555, 567), 'json.load', 'json.load', (['f'], {... |
from collections import ChainMap
from typing import (
Any,
Dict,
List,
Optional,
Protocol,
Sequence,
get_args,
runtime_checkable,
)
from llama_index.legacy.bridge.pydantic import BaseModel, Field, validator
from llama_index.legacy.callbacks import CBEventType, EventPayload
from llama_in... | [
"llama_index.legacy.core.query_pipeline.query_component.InputKeys.from_keys",
"llama_index.legacy.core.llms.types.ChatMessage",
"llama_index.legacy.core.query_pipeline.query_component.OutputKeys.from_keys",
"llama_index.legacy.bridge.pydantic.Field",
"llama_index.legacy.core.query_pipeline.query_component.v... | [((2828, 2891), 'llama_index.legacy.bridge.pydantic.Field', 'Field', ([], {'default': 'None', 'description': '"""System prompt for LLM calls."""'}), "(default=None, description='System prompt for LLM calls.')\n", (2833, 2891), False, 'from llama_index.legacy.bridge.pydantic import BaseModel, Field, validator\n'), ((295... |
from collections import ChainMap
from typing import (
Any,
Dict,
List,
Optional,
Protocol,
Sequence,
get_args,
runtime_checkable,
)
from llama_index.legacy.bridge.pydantic import BaseModel, Field, validator
from llama_index.legacy.callbacks import CBEventType, EventPayload
from llama_in... | [
"llama_index.legacy.core.query_pipeline.query_component.InputKeys.from_keys",
"llama_index.legacy.core.llms.types.ChatMessage",
"llama_index.legacy.core.query_pipeline.query_component.OutputKeys.from_keys",
"llama_index.legacy.bridge.pydantic.Field",
"llama_index.legacy.core.query_pipeline.query_component.v... | [((2828, 2891), 'llama_index.legacy.bridge.pydantic.Field', 'Field', ([], {'default': 'None', 'description': '"""System prompt for LLM calls."""'}), "(default=None, description='System prompt for LLM calls.')\n", (2833, 2891), False, 'from llama_index.legacy.bridge.pydantic import BaseModel, Field, validator\n'), ((295... |
"""Base reader class."""
from abc import ABC
from typing import TYPE_CHECKING, Any, Dict, Iterable, List
if TYPE_CHECKING:
from llama_index.core.bridge.langchain import Document as LCDocument
from llama_index.core.bridge.pydantic import Field
from llama_index.core.schema import BaseComponent, Document
class Bas... | [
"llama_index.core.bridge.pydantic.Field"
] | [((1219, 1321), 'llama_index.core.bridge.pydantic.Field', 'Field', ([], {'default': '(False)', 'description': '"""Whether the data is loaded from a remote API or a local file."""'}), "(default=False, description=\n 'Whether the data is loaded from a remote API or a local file.')\n", (1224, 1321), False, 'from llama_... |
"""Base reader class."""
from abc import ABC
from typing import TYPE_CHECKING, Any, Dict, Iterable, List
if TYPE_CHECKING:
from llama_index.core.bridge.langchain import Document as LCDocument
from llama_index.core.bridge.pydantic import Field
from llama_index.core.schema import BaseComponent, Document
class Bas... | [
"llama_index.core.bridge.pydantic.Field"
] | [((1219, 1321), 'llama_index.core.bridge.pydantic.Field', 'Field', ([], {'default': '(False)', 'description': '"""Whether the data is loaded from a remote API or a local file."""'}), "(default=False, description=\n 'Whether the data is loaded from a remote API or a local file.')\n", (1224, 1321), False, 'from llama_... |
"""Base object types."""
import pickle
import warnings
from typing import Any, Dict, Generic, List, Optional, Sequence, Type, TypeVar
from llama_index.core.base.base_retriever import BaseRetriever
from llama_index.core.base.query_pipeline.query import (
ChainableMixin,
InputKeys,
OutputKeys,
QueryComp... | [
"llama_index.core.indices.load_index_from_storage",
"llama_index.core.objects.base_node_mapping.SimpleObjectNodeMapping.from_objects",
"llama_index.core.base.query_pipeline.query.InputKeys.from_keys",
"llama_index.core.base.query_pipeline.query.OutputKeys.from_keys",
"llama_index.core.objects.base_node_mapp... | [((897, 910), 'typing.TypeVar', 'TypeVar', (['"""OT"""'], {}), "('OT')\n", (904, 910), False, 'from typing import Any, Dict, Generic, List, Optional, Sequence, Type, TypeVar\n'), ((2032, 2068), 'llama_index.core.bridge.pydantic.Field', 'Field', (['...'], {'description': '"""Retriever."""'}), "(..., description='Retriev... |
"""Base object types."""
import pickle
import warnings
from typing import Any, Dict, Generic, List, Optional, Sequence, Type, TypeVar
from llama_index.core.base.base_retriever import BaseRetriever
from llama_index.core.base.query_pipeline.query import (
ChainableMixin,
InputKeys,
OutputKeys,
QueryComp... | [
"llama_index.core.indices.load_index_from_storage",
"llama_index.core.objects.base_node_mapping.SimpleObjectNodeMapping.from_objects",
"llama_index.core.base.query_pipeline.query.InputKeys.from_keys",
"llama_index.core.base.query_pipeline.query.OutputKeys.from_keys",
"llama_index.core.objects.base_node_mapp... | [((897, 910), 'typing.TypeVar', 'TypeVar', (['"""OT"""'], {}), "('OT')\n", (904, 910), False, 'from typing import Any, Dict, Generic, List, Optional, Sequence, Type, TypeVar\n'), ((2032, 2068), 'llama_index.core.bridge.pydantic.Field', 'Field', (['...'], {'description': '"""Retriever."""'}), "(..., description='Retriev... |
"""Base object types."""
import pickle
import warnings
from typing import Any, Dict, Generic, List, Optional, Sequence, Type, TypeVar
from llama_index.core.base.base_retriever import BaseRetriever
from llama_index.core.base.query_pipeline.query import (
ChainableMixin,
InputKeys,
OutputKeys,
QueryComp... | [
"llama_index.core.indices.load_index_from_storage",
"llama_index.core.objects.base_node_mapping.SimpleObjectNodeMapping.from_objects",
"llama_index.core.base.query_pipeline.query.InputKeys.from_keys",
"llama_index.core.base.query_pipeline.query.OutputKeys.from_keys",
"llama_index.core.objects.base_node_mapp... | [((897, 910), 'typing.TypeVar', 'TypeVar', (['"""OT"""'], {}), "('OT')\n", (904, 910), False, 'from typing import Any, Dict, Generic, List, Optional, Sequence, Type, TypeVar\n'), ((2032, 2068), 'llama_index.core.bridge.pydantic.Field', 'Field', (['...'], {'description': '"""Retriever."""'}), "(..., description='Retriev... |
from typing import Any, Callable, Optional, Sequence
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.core.llms.types import (
ChatMessage,
CompletionResponse,
CompletionResponseGen,
LLMMetadata,
)
from llama_index.legacy.llms.base import llm_completion_callback
from lla... | [
"llama_index.legacy.core.llms.types.CompletionResponse",
"llama_index.legacy.llms.base.llm_completion_callback",
"llama_index.legacy.core.llms.types.LLMMetadata"
] | [((1537, 1562), 'llama_index.legacy.llms.base.llm_completion_callback', 'llm_completion_callback', ([], {}), '()\n', (1560, 1562), False, 'from llama_index.legacy.llms.base import llm_completion_callback\n'), ((1876, 1901), 'llama_index.legacy.llms.base.llm_completion_callback', 'llm_completion_callback', ([], {}), '()... |
from typing import Any, Callable, Optional, Sequence
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.core.llms.types import (
ChatMessage,
CompletionResponse,
CompletionResponseGen,
LLMMetadata,
)
from llama_index.legacy.llms.base import llm_completion_callback
from lla... | [
"llama_index.legacy.core.llms.types.CompletionResponse",
"llama_index.legacy.llms.base.llm_completion_callback",
"llama_index.legacy.core.llms.types.LLMMetadata"
] | [((1537, 1562), 'llama_index.legacy.llms.base.llm_completion_callback', 'llm_completion_callback', ([], {}), '()\n', (1560, 1562), False, 'from llama_index.legacy.llms.base import llm_completion_callback\n'), ((1876, 1901), 'llama_index.legacy.llms.base.llm_completion_callback', 'llm_completion_callback', ([], {}), '()... |
import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core import VectorStoreIndex
async def main():
# DOWNLOAD LLAMADATASET
rag_dataset, documents = download_llama_dataset("MiniCovidQaDataset", "./data")
... | [
"llama_index.core.VectorStoreIndex.from_documents",
"llama_index.core.llama_dataset.download_llama_dataset",
"llama_index.core.llama_pack.download_llama_pack"
] | [((265, 319), 'llama_index.core.llama_dataset.download_llama_dataset', 'download_llama_dataset', (['"""MiniCovidQaDataset"""', '"""./data"""'], {}), "('MiniCovidQaDataset', './data')\n", (287, 319), False, 'from llama_index.core.llama_dataset import download_llama_dataset\n'), ((364, 416), 'llama_index.core.VectorStore... |
import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core import VectorStoreIndex
async def main():
# DOWNLOAD LLAMADATASET
rag_dataset, documents = download_llama_dataset("MiniCovidQaDataset", "./data")
... | [
"llama_index.core.VectorStoreIndex.from_documents",
"llama_index.core.llama_dataset.download_llama_dataset",
"llama_index.core.llama_pack.download_llama_pack"
] | [((265, 319), 'llama_index.core.llama_dataset.download_llama_dataset', 'download_llama_dataset', (['"""MiniCovidQaDataset"""', '"""./data"""'], {}), "('MiniCovidQaDataset', './data')\n", (287, 319), False, 'from llama_index.core.llama_dataset import download_llama_dataset\n'), ((364, 416), 'llama_index.core.VectorStore... |
"""Palm API."""
import os
from typing import Any, Callable, Optional, Sequence
from llama_index.legacy.bridge.pydantic import Field, PrivateAttr
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.constants import DEFAULT_NUM_OUTPUTS
from llama_index.legacy.core.llms.types import (
Ch... | [
"llama_index.legacy.llms.base.llm_completion_callback",
"llama_index.legacy.bridge.pydantic.PrivateAttr",
"llama_index.legacy.core.llms.types.LLMMetadata",
"llama_index.legacy.bridge.pydantic.Field",
"llama_index.legacy.core.llms.types.CompletionResponse"
] | [((708, 779), 'llama_index.legacy.bridge.pydantic.Field', 'Field', ([], {'default': 'DEFAULT_PALM_MODEL', 'description': '"""The PaLM model to use."""'}), "(default=DEFAULT_PALM_MODEL, description='The PaLM model to use.')\n", (713, 779), False, 'from llama_index.legacy.bridge.pydantic import Field, PrivateAttr\n'), ((... |
"""Palm API."""
import os
from typing import Any, Callable, Optional, Sequence
from llama_index.legacy.bridge.pydantic import Field, PrivateAttr
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.constants import DEFAULT_NUM_OUTPUTS
from llama_index.legacy.core.llms.types import (
Ch... | [
"llama_index.legacy.llms.base.llm_completion_callback",
"llama_index.legacy.bridge.pydantic.PrivateAttr",
"llama_index.legacy.core.llms.types.LLMMetadata",
"llama_index.legacy.bridge.pydantic.Field",
"llama_index.legacy.core.llms.types.CompletionResponse"
] | [((708, 779), 'llama_index.legacy.bridge.pydantic.Field', 'Field', ([], {'default': 'DEFAULT_PALM_MODEL', 'description': '"""The PaLM model to use."""'}), "(default=DEFAULT_PALM_MODEL, description='The PaLM model to use.')\n", (713, 779), False, 'from llama_index.legacy.bridge.pydantic import Field, PrivateAttr\n'), ((... |
from typing import Any, Callable, Dict, Optional, Sequence
from llama_index.legacy.bridge.pydantic import Field, PrivateAttr
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.core.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseGen,
CompletionResponse,
Comp... | [
"llama_index.legacy.llms.base.llm_chat_callback",
"llama_index.legacy.llms.generic_utils.get_from_param_or_env",
"llama_index.legacy.llms.base.llm_completion_callback",
"llama_index.legacy.bridge.pydantic.PrivateAttr",
"llama_index.legacy.bridge.pydantic.Field",
"llama_index.legacy.callbacks.CallbackManag... | [((827, 870), 'llama_index.legacy.bridge.pydantic.Field', 'Field', ([], {'description': '"""The AI21 model to use."""'}), "(description='The AI21 model to use.')\n", (832, 870), False, 'from llama_index.legacy.bridge.pydantic import Field, PrivateAttr\n'), ((892, 954), 'llama_index.legacy.bridge.pydantic.Field', 'Field... |
import json
from typing import Any, Callable, Dict, List, Optional, Sequence
from llama_index.legacy.bridge.pydantic import Field, PrivateAttr
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.core.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseAsyncGen,
ChatR... | [
"llama_index.legacy.llms.base.llm_chat_callback",
"llama_index.legacy.llms.generic_utils.stream_completion_response_to_chat_response",
"llama_index.legacy.llms.base.llm_completion_callback",
"llama_index.legacy.bridge.pydantic.PrivateAttr",
"llama_index.legacy.core.llms.types.LLMMetadata",
"llama_index.le... | [((1015, 1065), 'llama_index.legacy.bridge.pydantic.Field', 'Field', ([], {'description': '"""The HuggingFace Model to use."""'}), "(description='The HuggingFace Model to use.')\n", (1020, 1065), False, 'from llama_index.legacy.bridge.pydantic import Field, PrivateAttr\n'), ((1092, 1149), 'llama_index.legacy.bridge.pyd... |
import json
from typing import Any, Callable, Dict, List, Optional, Sequence
from llama_index.legacy.bridge.pydantic import Field, PrivateAttr
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.core.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseAsyncGen,
ChatR... | [
"llama_index.legacy.llms.base.llm_chat_callback",
"llama_index.legacy.llms.generic_utils.stream_completion_response_to_chat_response",
"llama_index.legacy.llms.base.llm_completion_callback",
"llama_index.legacy.bridge.pydantic.PrivateAttr",
"llama_index.legacy.core.llms.types.LLMMetadata",
"llama_index.le... | [((1015, 1065), 'llama_index.legacy.bridge.pydantic.Field', 'Field', ([], {'description': '"""The HuggingFace Model to use."""'}), "(description='The HuggingFace Model to use.')\n", (1020, 1065), False, 'from llama_index.legacy.bridge.pydantic import Field, PrivateAttr\n'), ((1092, 1149), 'llama_index.legacy.bridge.pyd... |
import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core import VectorStoreIndex
async def main():
# DOWNLOAD LLAMADATASET
rag_dataset, documents = download_llama_dataset("Llama2PaperDataset", "./data")
... | [
"llama_index.core.VectorStoreIndex.from_documents",
"llama_index.core.llama_dataset.download_llama_dataset",
"llama_index.core.llama_pack.download_llama_pack"
] | [((265, 319), 'llama_index.core.llama_dataset.download_llama_dataset', 'download_llama_dataset', (['"""Llama2PaperDataset"""', '"""./data"""'], {}), "('Llama2PaperDataset', './data')\n", (287, 319), False, 'from llama_index.core.llama_dataset import download_llama_dataset\n'), ((364, 416), 'llama_index.core.VectorStore... |
import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core import VectorStoreIndex
async def main():
# DOWNLOAD LLAMADATASET
rag_dataset, documents = download_llama_dataset("Llama2PaperDataset", "./data")
... | [
"llama_index.core.VectorStoreIndex.from_documents",
"llama_index.core.llama_dataset.download_llama_dataset",
"llama_index.core.llama_pack.download_llama_pack"
] | [((265, 319), 'llama_index.core.llama_dataset.download_llama_dataset', 'download_llama_dataset', (['"""Llama2PaperDataset"""', '"""./data"""'], {}), "('Llama2PaperDataset', './data')\n", (287, 319), False, 'from llama_index.core.llama_dataset import download_llama_dataset\n'), ((364, 416), 'llama_index.core.VectorStore... |
"""Prompts."""
from abc import ABC, abstractmethod
from copy import deepcopy
from typing import (
TYPE_CHECKING,
Any,
Callable,
Dict,
List,
Optional,
Sequence,
Tuple,
Union,
)
from llama_index.core.bridge.pydantic import Field
if TYPE_CHECKING:
from llama_index.core.bridge.lan... | [
"llama_index.llms.langchain.utils.from_lc_messages",
"llama_index.core.base.query_pipeline.query.OutputKeys.from_keys",
"llama_index.core.bridge.pydantic.Field",
"llama_index.core.bridge.langchain.ConditionalPromptSelector",
"llama_index.core.base.query_pipeline.query.validate_and_convert_stringable",
"ll... | [((1473, 1559), 'llama_index.core.bridge.pydantic.Field', 'Field', ([], {'default_factory': 'dict', 'description': '"""Template variable mappings (Optional)."""'}), "(default_factory=dict, description=\n 'Template variable mappings (Optional).')\n", (1478, 1559), False, 'from llama_index.core.bridge.pydantic import ... |
"""Prompts."""
from abc import ABC, abstractmethod
from copy import deepcopy
from typing import (
TYPE_CHECKING,
Any,
Callable,
Dict,
List,
Optional,
Sequence,
Tuple,
Union,
)
from llama_index.core.bridge.pydantic import Field
if TYPE_CHECKING:
from llama_index.core.bridge.lan... | [
"llama_index.llms.langchain.utils.from_lc_messages",
"llama_index.core.base.query_pipeline.query.OutputKeys.from_keys",
"llama_index.core.bridge.pydantic.Field",
"llama_index.core.bridge.langchain.ConditionalPromptSelector",
"llama_index.core.base.query_pipeline.query.validate_and_convert_stringable",
"ll... | [((1473, 1559), 'llama_index.core.bridge.pydantic.Field', 'Field', ([], {'default_factory': 'dict', 'description': '"""Template variable mappings (Optional)."""'}), "(default_factory=dict, description=\n 'Template variable mappings (Optional).')\n", (1478, 1559), False, 'from llama_index.core.bridge.pydantic import ... |
import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core import VectorStoreIndex
from llama_index.llms import OpenAI
async def main():
# DOWNLOAD LLAMADATASET
rag_dataset, documents = download_llama_data... | [
"llama_index.core.VectorStoreIndex.from_documents",
"llama_index.llms.OpenAI",
"llama_index.core.llama_dataset.download_llama_dataset",
"llama_index.core.llama_pack.download_llama_pack"
] | [((301, 371), 'llama_index.core.llama_dataset.download_llama_dataset', 'download_llama_dataset', (['"""Uber10KDataset2021"""', '"""./uber10k_2021_dataset"""'], {}), "('Uber10KDataset2021', './uber10k_2021_dataset')\n", (323, 371), False, 'from llama_index.core.llama_dataset import download_llama_dataset\n'), ((430, 482... |
import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core import VectorStoreIndex
from llama_index.llms import OpenAI
async def main():
# DOWNLOAD LLAMADATASET
rag_dataset, documents = download_llama_data... | [
"llama_index.core.VectorStoreIndex.from_documents",
"llama_index.llms.OpenAI",
"llama_index.core.llama_dataset.download_llama_dataset",
"llama_index.core.llama_pack.download_llama_pack"
] | [((301, 371), 'llama_index.core.llama_dataset.download_llama_dataset', 'download_llama_dataset', (['"""Uber10KDataset2021"""', '"""./uber10k_2021_dataset"""'], {}), "('Uber10KDataset2021', './uber10k_2021_dataset')\n", (323, 371), False, 'from llama_index.core.llama_dataset import download_llama_dataset\n'), ((430, 482... |
import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core.evaluation import PairwiseComparisonEvaluator
from llama_index.llms import OpenAI, Gemini
from llama_index.core import ServiceContext
import pandas as pd
... | [
"llama_index.core.llama_pack.download_llama_pack",
"llama_index.core.evaluation.PairwiseComparisonEvaluator",
"llama_index.llms.Gemini",
"llama_index.llms.OpenAI",
"llama_index.core.llama_dataset.download_llama_dataset"
] | [((402, 475), 'llama_index.core.llama_dataset.download_llama_dataset', 'download_llama_dataset', (['"""MtBenchHumanJudgementDataset"""', '"""./mt_bench_data"""'], {}), "('MtBenchHumanJudgementDataset', './mt_bench_data')\n", (424, 475), False, 'from llama_index.core.llama_dataset import download_llama_dataset\n'), ((16... |
import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core.evaluation import PairwiseComparisonEvaluator
from llama_index.llms import OpenAI, Gemini
from llama_index.core import ServiceContext
import pandas as pd
... | [
"llama_index.core.llama_pack.download_llama_pack",
"llama_index.core.evaluation.PairwiseComparisonEvaluator",
"llama_index.llms.Gemini",
"llama_index.llms.OpenAI",
"llama_index.core.llama_dataset.download_llama_dataset"
] | [((402, 475), 'llama_index.core.llama_dataset.download_llama_dataset', 'download_llama_dataset', (['"""MtBenchHumanJudgementDataset"""', '"""./mt_bench_data"""'], {}), "('MtBenchHumanJudgementDataset', './mt_bench_data')\n", (424, 475), False, 'from llama_index.core.llama_dataset import download_llama_dataset\n'), ((16... |
from abc import abstractmethod
from typing import (
Any,
Sequence,
)
from llama_index.core.base.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseAsyncGen,
ChatResponseGen,
CompletionResponse,
CompletionResponseAsyncGen,
CompletionResponseGen,
LLMMetadata,
)
from llama_... | [
"llama_index.core.bridge.pydantic.Field",
"llama_index.core.callbacks.CallbackManager",
"llama_index.core.bridge.pydantic.validator"
] | [((669, 721), 'llama_index.core.bridge.pydantic.Field', 'Field', ([], {'default_factory': 'CallbackManager', 'exclude': '(True)'}), '(default_factory=CallbackManager, exclude=True)\n', (674, 721), False, 'from llama_index.core.bridge.pydantic import Field, validator\n'), ((800, 839), 'llama_index.core.bridge.pydantic.v... |
from abc import abstractmethod
from typing import (
Any,
Sequence,
)
from llama_index.core.base.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseAsyncGen,
ChatResponseGen,
CompletionResponse,
CompletionResponseAsyncGen,
CompletionResponseGen,
LLMMetadata,
)
from llama_... | [
"llama_index.core.bridge.pydantic.Field",
"llama_index.core.callbacks.CallbackManager",
"llama_index.core.bridge.pydantic.validator"
] | [((669, 721), 'llama_index.core.bridge.pydantic.Field', 'Field', ([], {'default_factory': 'CallbackManager', 'exclude': '(True)'}), '(default_factory=CallbackManager, exclude=True)\n', (674, 721), False, 'from llama_index.core.bridge.pydantic import Field, validator\n'), ((800, 839), 'llama_index.core.bridge.pydantic.v... |
from abc import abstractmethod
from typing import (
Any,
Sequence,
)
from llama_index.core.base.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseAsyncGen,
ChatResponseGen,
CompletionResponse,
CompletionResponseAsyncGen,
CompletionResponseGen,
LLMMetadata,
)
from llama_... | [
"llama_index.core.bridge.pydantic.Field",
"llama_index.core.callbacks.CallbackManager",
"llama_index.core.bridge.pydantic.validator"
] | [((669, 721), 'llama_index.core.bridge.pydantic.Field', 'Field', ([], {'default_factory': 'CallbackManager', 'exclude': '(True)'}), '(default_factory=CallbackManager, exclude=True)\n', (674, 721), False, 'from llama_index.core.bridge.pydantic import Field, validator\n'), ((800, 839), 'llama_index.core.bridge.pydantic.v... |
from typing import Any, Sequence
from llama_index.legacy.core.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseAsyncGen,
ChatResponseGen,
CompletionResponse,
CompletionResponseAsyncGen,
)
from llama_index.legacy.llms.base import (
llm_chat_callback,
llm_completion_callback,
)
... | [
"llama_index.legacy.llms.generic_utils.completion_response_to_chat_response",
"llama_index.legacy.llms.base.llm_completion_callback",
"llama_index.legacy.llms.base.llm_chat_callback",
"llama_index.legacy.llms.generic_utils.stream_completion_response_to_chat_response"
] | [((710, 729), 'llama_index.legacy.llms.base.llm_chat_callback', 'llm_chat_callback', ([], {}), '()\n', (727, 729), False, 'from llama_index.legacy.llms.base import llm_chat_callback, llm_completion_callback\n'), ((1022, 1041), 'llama_index.legacy.llms.base.llm_chat_callback', 'llm_chat_callback', ([], {}), '()\n', (103... |
from typing import Any, Sequence
from llama_index.legacy.core.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseAsyncGen,
ChatResponseGen,
CompletionResponse,
CompletionResponseAsyncGen,
)
from llama_index.legacy.llms.base import (
llm_chat_callback,
llm_completion_callback,
)
... | [
"llama_index.legacy.llms.generic_utils.completion_response_to_chat_response",
"llama_index.legacy.llms.base.llm_completion_callback",
"llama_index.legacy.llms.base.llm_chat_callback",
"llama_index.legacy.llms.generic_utils.stream_completion_response_to_chat_response"
] | [((710, 729), 'llama_index.legacy.llms.base.llm_chat_callback', 'llm_chat_callback', ([], {}), '()\n', (727, 729), False, 'from llama_index.legacy.llms.base import llm_chat_callback, llm_completion_callback\n'), ((1022, 1041), 'llama_index.legacy.llms.base.llm_chat_callback', 'llm_chat_callback', ([], {}), '()\n', (103... |
from abc import abstractmethod
from typing import Any, List, Sequence, Union
from llama_index.core.base.query_pipeline.query import (
ChainableMixin,
QueryComponent,
)
from llama_index.core.bridge.pydantic import BaseModel
from llama_index.core.prompts.mixin import PromptMixin, PromptMixinType
from llama_index... | [
"llama_index.core.query_pipeline.components.router.SelectorComponent",
"llama_index.core.tools.types.ToolMetadata",
"llama_index.core.schema.QueryBundle"
] | [((3300, 3332), 'llama_index.core.query_pipeline.components.router.SelectorComponent', 'SelectorComponent', ([], {'selector': 'self'}), '(selector=self)\n', (3317, 3332), False, 'from llama_index.core.query_pipeline.components.router import SelectorComponent\n'), ((1653, 1685), 'llama_index.core.tools.types.ToolMetadat... |
from abc import abstractmethod
from typing import Any, List, Sequence, Union
from llama_index.core.base.query_pipeline.query import (
ChainableMixin,
QueryComponent,
)
from llama_index.core.bridge.pydantic import BaseModel
from llama_index.core.prompts.mixin import PromptMixin, PromptMixinType
from llama_index... | [
"llama_index.core.query_pipeline.components.router.SelectorComponent",
"llama_index.core.tools.types.ToolMetadata",
"llama_index.core.schema.QueryBundle"
] | [((3300, 3332), 'llama_index.core.query_pipeline.components.router.SelectorComponent', 'SelectorComponent', ([], {'selector': 'self'}), '(selector=self)\n', (3317, 3332), False, 'from llama_index.core.query_pipeline.components.router import SelectorComponent\n'), ((1653, 1685), 'llama_index.core.tools.types.ToolMetadat... |
from abc import abstractmethod
from typing import Any, List, Sequence, Union
from llama_index.core.base.query_pipeline.query import (
ChainableMixin,
QueryComponent,
)
from llama_index.core.bridge.pydantic import BaseModel
from llama_index.core.prompts.mixin import PromptMixin, PromptMixinType
from llama_index... | [
"llama_index.core.query_pipeline.components.router.SelectorComponent",
"llama_index.core.tools.types.ToolMetadata",
"llama_index.core.schema.QueryBundle"
] | [((3300, 3332), 'llama_index.core.query_pipeline.components.router.SelectorComponent', 'SelectorComponent', ([], {'selector': 'self'}), '(selector=self)\n', (3317, 3332), False, 'from llama_index.core.query_pipeline.components.router import SelectorComponent\n'), ((1653, 1685), 'llama_index.core.tools.types.ToolMetadat... |
from abc import abstractmethod
from typing import Any, List, Sequence, Union
from llama_index.core.base.query_pipeline.query import (
ChainableMixin,
QueryComponent,
)
from llama_index.core.bridge.pydantic import BaseModel
from llama_index.core.prompts.mixin import PromptMixin, PromptMixinType
from llama_index... | [
"llama_index.core.query_pipeline.components.router.SelectorComponent",
"llama_index.core.tools.types.ToolMetadata",
"llama_index.core.schema.QueryBundle"
] | [((3300, 3332), 'llama_index.core.query_pipeline.components.router.SelectorComponent', 'SelectorComponent', ([], {'selector': 'self'}), '(selector=self)\n', (3317, 3332), False, 'from llama_index.core.query_pipeline.components.router import SelectorComponent\n'), ((1653, 1685), 'llama_index.core.tools.types.ToolMetadat... |
"""Base agent type."""
import uuid
from abc import abstractmethod
from typing import Any, Dict, List, Optional
from llama_index.legacy.bridge.pydantic import BaseModel, Field
from llama_index.legacy.callbacks import CallbackManager, trace_method
from llama_index.legacy.chat_engine.types import (
BaseChatEngine,
... | [
"llama_index.legacy.callbacks.trace_method",
"llama_index.legacy.bridge.pydantic.Field"
] | [((1310, 1331), 'llama_index.legacy.callbacks.trace_method', 'trace_method', (['"""query"""'], {}), "('query')\n", (1322, 1331), False, 'from llama_index.legacy.callbacks import CallbackManager, trace_method\n'), ((1633, 1654), 'llama_index.legacy.callbacks.trace_method', 'trace_method', (['"""query"""'], {}), "('query... |
"""Base agent type."""
import uuid
from abc import abstractmethod
from typing import Any, Dict, List, Optional
from llama_index.legacy.bridge.pydantic import BaseModel, Field
from llama_index.legacy.callbacks import CallbackManager, trace_method
from llama_index.legacy.chat_engine.types import (
BaseChatEngine,
... | [
"llama_index.legacy.callbacks.trace_method",
"llama_index.legacy.bridge.pydantic.Field"
] | [((1310, 1331), 'llama_index.legacy.callbacks.trace_method', 'trace_method', (['"""query"""'], {}), "('query')\n", (1322, 1331), False, 'from llama_index.legacy.callbacks import CallbackManager, trace_method\n'), ((1633, 1654), 'llama_index.legacy.callbacks.trace_method', 'trace_method', (['"""query"""'], {}), "('query... |
import json
from typing import Any, Dict, Sequence, Tuple
import httpx
from httpx import Timeout
from llama_index.legacy.bridge.pydantic import Field
from llama_index.legacy.constants import DEFAULT_CONTEXT_WINDOW, DEFAULT_NUM_OUTPUTS
from llama_index.legacy.core.llms.types import (
ChatMessage,
ChatResponse,... | [
"llama_index.legacy.llms.base.llm_completion_callback",
"llama_index.legacy.llms.base.llm_chat_callback",
"llama_index.legacy.core.llms.types.LLMMetadata",
"llama_index.legacy.bridge.pydantic.Field"
] | [((816, 911), 'llama_index.legacy.bridge.pydantic.Field', 'Field', ([], {'default': '"""http://localhost:11434"""', 'description': '"""Base url the model is hosted under."""'}), "(default='http://localhost:11434', description=\n 'Base url the model is hosted under.')\n", (821, 911), False, 'from llama_index.legacy.b... |
import json
from typing import Any, Dict, Sequence, Tuple
import httpx
from httpx import Timeout
from llama_index.legacy.bridge.pydantic import Field
from llama_index.legacy.constants import DEFAULT_CONTEXT_WINDOW, DEFAULT_NUM_OUTPUTS
from llama_index.legacy.core.llms.types import (
ChatMessage,
ChatResponse,... | [
"llama_index.legacy.llms.base.llm_completion_callback",
"llama_index.legacy.llms.base.llm_chat_callback",
"llama_index.legacy.core.llms.types.LLMMetadata",
"llama_index.legacy.bridge.pydantic.Field"
] | [((816, 911), 'llama_index.legacy.bridge.pydantic.Field', 'Field', ([], {'default': '"""http://localhost:11434"""', 'description': '"""Base url the model is hosted under."""'}), "(default='http://localhost:11434', description=\n 'Base url the model is hosted under.')\n", (821, 911), False, 'from llama_index.legacy.b... |
import warnings
from typing import Any, Callable, Dict, Optional, Sequence
from llama_index.legacy.bridge.pydantic import Field, PrivateAttr
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.core.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseAsyncGen,
ChatRes... | [
"llama_index.legacy.llms.base.llm_chat_callback",
"llama_index.legacy.core.llms.types.ChatMessage",
"llama_index.legacy.llms.cohere_utils.cohere_modelname_to_contextsize",
"llama_index.legacy.llms.base.llm_completion_callback",
"llama_index.legacy.bridge.pydantic.PrivateAttr",
"llama_index.legacy.bridge.p... | [((897, 942), 'llama_index.legacy.bridge.pydantic.Field', 'Field', ([], {'description': '"""The cohere model to use."""'}), "(description='The cohere model to use.')\n", (902, 942), False, 'from llama_index.legacy.bridge.pydantic import Field, PrivateAttr\n'), ((968, 1025), 'llama_index.legacy.bridge.pydantic.Field', '... |
import warnings
from typing import Any, Callable, Dict, Optional, Sequence
from llama_index.legacy.bridge.pydantic import Field, PrivateAttr
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.core.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseAsyncGen,
ChatRes... | [
"llama_index.legacy.llms.base.llm_chat_callback",
"llama_index.legacy.core.llms.types.ChatMessage",
"llama_index.legacy.llms.cohere_utils.cohere_modelname_to_contextsize",
"llama_index.legacy.llms.base.llm_completion_callback",
"llama_index.legacy.bridge.pydantic.PrivateAttr",
"llama_index.legacy.bridge.p... | [((897, 942), 'llama_index.legacy.bridge.pydantic.Field', 'Field', ([], {'description': '"""The cohere model to use."""'}), "(description='The cohere model to use.')\n", (902, 942), False, 'from llama_index.legacy.bridge.pydantic import Field, PrivateAttr\n'), ((968, 1025), 'llama_index.legacy.bridge.pydantic.Field', '... |
from abc import abstractmethod
from typing import List
from llama_index.core.indices.query.schema import QueryBundle, QueryType
from llama_index.core.prompts.mixin import PromptMixin
from llama_index.core.schema import NodeWithScore
class BaseImageRetriever(PromptMixin):
"""Base Image Retriever Abstraction."""
... | [
"llama_index.core.indices.query.schema.QueryBundle"
] | [((706, 748), 'llama_index.core.indices.query.schema.QueryBundle', 'QueryBundle', ([], {'query_str': 'str_or_query_bundle'}), '(query_str=str_or_query_bundle)\n', (717, 748), False, 'from llama_index.core.indices.query.schema import QueryBundle, QueryType\n'), ((1525, 1582), 'llama_index.core.indices.query.schema.Query... |
from abc import abstractmethod
from typing import List
from llama_index.core.indices.query.schema import QueryBundle, QueryType
from llama_index.core.prompts.mixin import PromptMixin
from llama_index.core.schema import NodeWithScore
class BaseImageRetriever(PromptMixin):
"""Base Image Retriever Abstraction."""
... | [
"llama_index.core.indices.query.schema.QueryBundle"
] | [((706, 748), 'llama_index.core.indices.query.schema.QueryBundle', 'QueryBundle', ([], {'query_str': 'str_or_query_bundle'}), '(query_str=str_or_query_bundle)\n', (717, 748), False, 'from llama_index.core.indices.query.schema import QueryBundle, QueryType\n'), ((1525, 1582), 'llama_index.core.indices.query.schema.Query... |
from abc import abstractmethod
from typing import List
from llama_index.core.indices.query.schema import QueryBundle, QueryType
from llama_index.core.prompts.mixin import PromptMixin
from llama_index.core.schema import NodeWithScore
class BaseImageRetriever(PromptMixin):
"""Base Image Retriever Abstraction."""
... | [
"llama_index.core.indices.query.schema.QueryBundle"
] | [((706, 748), 'llama_index.core.indices.query.schema.QueryBundle', 'QueryBundle', ([], {'query_str': 'str_or_query_bundle'}), '(query_str=str_or_query_bundle)\n', (717, 748), False, 'from llama_index.core.indices.query.schema import QueryBundle, QueryType\n'), ((1525, 1582), 'llama_index.core.indices.query.schema.Query... |
import json
from abc import abstractmethod
from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, Dict, Optional, Type
if TYPE_CHECKING:
from llama_index.legacy.bridge.langchain import StructuredTool, Tool
from deprecated import deprecated
from llama_index.legacy.bridge.pydantic import BaseModel... | [
"llama_index.legacy.bridge.langchain.Tool.from_function",
"llama_index.legacy.bridge.langchain.StructuredTool.from_function"
] | [((1586, 1675), 'deprecated.deprecated', 'deprecated', (['"""Deprecated in favor of `to_openai_tool`, which should be used instead."""'], {}), "(\n 'Deprecated in favor of `to_openai_tool`, which should be used instead.')\n", (1596, 1675), False, 'from deprecated import deprecated\n'), ((1400, 1422), 'json.dumps', '... |
import json
from abc import abstractmethod
from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, Dict, Optional, Type
if TYPE_CHECKING:
from llama_index.legacy.bridge.langchain import StructuredTool, Tool
from deprecated import deprecated
from llama_index.legacy.bridge.pydantic import BaseModel... | [
"llama_index.legacy.bridge.langchain.Tool.from_function",
"llama_index.legacy.bridge.langchain.StructuredTool.from_function"
] | [((1586, 1675), 'deprecated.deprecated', 'deprecated', (['"""Deprecated in favor of `to_openai_tool`, which should be used instead."""'], {}), "(\n 'Deprecated in favor of `to_openai_tool`, which should be used instead.')\n", (1596, 1675), False, 'from deprecated import deprecated\n'), ((1400, 1422), 'json.dumps', '... |
import logging
from dataclasses import dataclass
from typing import Any, List, Optional, cast
from deprecated import deprecated
import llama_index.core
from llama_index.core.bridge.pydantic import BaseModel
from llama_index.core.callbacks.base import CallbackManager
from llama_index.core.base.embeddings.base import B... | [
"llama_index.core.llms.utils.resolve_llm",
"llama_index.core.indices.prompt_helper.PromptHelper.from_llm_metadata",
"llama_index.core.indices.prompt_helper.PromptHelper.from_dict",
"llama_index.core.embeddings.utils.resolve_embed_model",
"llama_index.core.embeddings.loading.load_embed_model",
"llama_index... | [((1138, 1165), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1155, 1165), False, 'import logging\n'), ((1940, 1997), 'llama_index.core.indices.prompt_helper.PromptHelper.from_llm_metadata', 'PromptHelper.from_llm_metadata', ([], {'llm_metadata': 'llm_metadata'}), '(llm_metadata=llm_met... |
import logging
from dataclasses import dataclass
from typing import Any, List, Optional, cast
from deprecated import deprecated
import llama_index.core
from llama_index.core.bridge.pydantic import BaseModel
from llama_index.core.callbacks.base import CallbackManager
from llama_index.core.base.embeddings.base import B... | [
"llama_index.core.llms.utils.resolve_llm",
"llama_index.core.indices.prompt_helper.PromptHelper.from_llm_metadata",
"llama_index.core.indices.prompt_helper.PromptHelper.from_dict",
"llama_index.core.embeddings.utils.resolve_embed_model",
"llama_index.core.embeddings.loading.load_embed_model",
"llama_index... | [((1138, 1165), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1155, 1165), False, 'import logging\n'), ((1940, 1997), 'llama_index.core.indices.prompt_helper.PromptHelper.from_llm_metadata', 'PromptHelper.from_llm_metadata', ([], {'llm_metadata': 'llm_metadata'}), '(llm_metadata=llm_met... |
import json
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
from llama_index.legacy.bridge.pydantic import Field
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.constants import DEFAULT_CONTEXT_WINDOW, DEFAULT_NUM_OUTPUTS
from llama_index.legacy.core.llms... | [
"llama_index.legacy.llms.base.llm_chat_callback",
"llama_index.legacy.core.llms.types.ChatResponse",
"llama_index.legacy.core.llms.types.ChatMessage",
"llama_index.legacy.llms.base.llm_completion_callback",
"llama_index.legacy.core.llms.types.LLMMetadata",
"llama_index.legacy.bridge.pydantic.Field",
"ll... | [((893, 968), 'llama_index.legacy.bridge.pydantic.Field', 'Field', ([], {'default': 'DEFAULT_RUNGPT_MODEL', 'description': '"""The rungpt model to use."""'}), "(default=DEFAULT_RUNGPT_MODEL, description='The rungpt model to use.')\n", (898, 968), False, 'from llama_index.legacy.bridge.pydantic import Field\n'), ((1003,... |
import json
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
from llama_index.legacy.bridge.pydantic import Field
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.constants import DEFAULT_CONTEXT_WINDOW, DEFAULT_NUM_OUTPUTS
from llama_index.legacy.core.llms... | [
"llama_index.legacy.llms.base.llm_chat_callback",
"llama_index.legacy.core.llms.types.ChatResponse",
"llama_index.legacy.core.llms.types.ChatMessage",
"llama_index.legacy.llms.base.llm_completion_callback",
"llama_index.legacy.core.llms.types.LLMMetadata",
"llama_index.legacy.bridge.pydantic.Field",
"ll... | [((893, 968), 'llama_index.legacy.bridge.pydantic.Field', 'Field', ([], {'default': 'DEFAULT_RUNGPT_MODEL', 'description': '"""The rungpt model to use."""'}), "(default=DEFAULT_RUNGPT_MODEL, description='The rungpt model to use.')\n", (898, 968), False, 'from llama_index.legacy.bridge.pydantic import Field\n'), ((1003,... |
from typing import List, Optional
import fsspec
from llama_index.core.bridge.pydantic import BaseModel, Field
from llama_index.core.schema import BaseNode
from llama_index.core.storage.docstore.utils import doc_to_json, json_to_doc
from llama_index.core.storage.kvstore import (
SimpleKVStore as SimpleCache,
)
from... | [
"llama_index.core.storage.kvstore.SimpleKVStore.from_persist_path",
"llama_index.core.bridge.pydantic.Field",
"llama_index.core.storage.docstore.utils.json_to_doc",
"llama_index.core.storage.docstore.utils.doc_to_json"
] | [((577, 655), 'llama_index.core.bridge.pydantic.Field', 'Field', ([], {'default': 'DEFAULT_CACHE_NAME', 'description': '"""Collection name of the cache."""'}), "(default=DEFAULT_CACHE_NAME, description='Collection name of the cache.')\n", (582, 655), False, 'from llama_index.core.bridge.pydantic import BaseModel, Field... |
from typing import List, Optional
import fsspec
from llama_index.core.bridge.pydantic import BaseModel, Field
from llama_index.core.schema import BaseNode
from llama_index.core.storage.docstore.utils import doc_to_json, json_to_doc
from llama_index.core.storage.kvstore import (
SimpleKVStore as SimpleCache,
)
from... | [
"llama_index.core.storage.kvstore.SimpleKVStore.from_persist_path",
"llama_index.core.bridge.pydantic.Field",
"llama_index.core.storage.docstore.utils.json_to_doc",
"llama_index.core.storage.docstore.utils.doc_to_json"
] | [((577, 655), 'llama_index.core.bridge.pydantic.Field', 'Field', ([], {'default': 'DEFAULT_CACHE_NAME', 'description': '"""Collection name of the cache."""'}), "(default=DEFAULT_CACHE_NAME, description='Collection name of the cache.')\n", (582, 655), False, 'from llama_index.core.bridge.pydantic import BaseModel, Field... |
from typing import List, Optional
import fsspec
from llama_index.core.bridge.pydantic import BaseModel, Field
from llama_index.core.schema import BaseNode
from llama_index.core.storage.docstore.utils import doc_to_json, json_to_doc
from llama_index.core.storage.kvstore import (
SimpleKVStore as SimpleCache,
)
from... | [
"llama_index.core.storage.kvstore.SimpleKVStore.from_persist_path",
"llama_index.core.bridge.pydantic.Field",
"llama_index.core.storage.docstore.utils.json_to_doc",
"llama_index.core.storage.docstore.utils.doc_to_json"
] | [((577, 655), 'llama_index.core.bridge.pydantic.Field', 'Field', ([], {'default': 'DEFAULT_CACHE_NAME', 'description': '"""Collection name of the cache."""'}), "(default=DEFAULT_CACHE_NAME, description='Collection name of the cache.')\n", (582, 655), False, 'from llama_index.core.bridge.pydantic import BaseModel, Field... |
"""Base object types."""
import pickle
import warnings
from typing import Any, Dict, Generic, List, Optional, Sequence, Type, TypeVar
from llama_index.legacy.bridge.pydantic import Field
from llama_index.legacy.callbacks.base import CallbackManager
from llama_index.legacy.core.base_retriever import BaseRetriever
from... | [
"llama_index.legacy.core.query_pipeline.query_component.InputKeys.from_keys",
"llama_index.legacy.indices.load_index_from_storage",
"llama_index.legacy.core.query_pipeline.query_component.OutputKeys.from_keys",
"llama_index.legacy.objects.base_node_mapping.SimpleObjectNodeMapping.from_objects",
"llama_index... | [((925, 938), 'typing.TypeVar', 'TypeVar', (['"""OT"""'], {}), "('OT')\n", (932, 938), False, 'from typing import Any, Dict, Generic, List, Optional, Sequence, Type, TypeVar\n'), ((2060, 2096), 'llama_index.legacy.bridge.pydantic.Field', 'Field', (['...'], {'description': '"""Retriever."""'}), "(..., description='Retri... |
"""Base object types."""
import pickle
import warnings
from typing import Any, Dict, Generic, List, Optional, Sequence, Type, TypeVar
from llama_index.legacy.bridge.pydantic import Field
from llama_index.legacy.callbacks.base import CallbackManager
from llama_index.legacy.core.base_retriever import BaseRetriever
from... | [
"llama_index.legacy.core.query_pipeline.query_component.InputKeys.from_keys",
"llama_index.legacy.indices.load_index_from_storage",
"llama_index.legacy.core.query_pipeline.query_component.OutputKeys.from_keys",
"llama_index.legacy.objects.base_node_mapping.SimpleObjectNodeMapping.from_objects",
"llama_index... | [((925, 938), 'typing.TypeVar', 'TypeVar', (['"""OT"""'], {}), "('OT')\n", (932, 938), False, 'from typing import Any, Dict, Generic, List, Optional, Sequence, Type, TypeVar\n'), ((2060, 2096), 'llama_index.legacy.bridge.pydantic.Field', 'Field', (['...'], {'description': '"""Retriever."""'}), "(..., description='Retri... |
"""Base reader class."""
from abc import ABC
from typing import TYPE_CHECKING, Any, Dict, Iterable, List
if TYPE_CHECKING:
from llama_index.legacy.bridge.langchain import Document as LCDocument
from llama_index.legacy.bridge.pydantic import Field
from llama_index.legacy.schema import BaseComponent, Document
cla... | [
"llama_index.legacy.bridge.pydantic.Field"
] | [((1225, 1327), 'llama_index.legacy.bridge.pydantic.Field', 'Field', ([], {'default': '(False)', 'description': '"""Whether the data is loaded from a remote API or a local file."""'}), "(default=False, description=\n 'Whether the data is loaded from a remote API or a local file.')\n", (1230, 1327), False, 'from llam... |
"""Base reader class."""
from abc import ABC
from typing import TYPE_CHECKING, Any, Dict, Iterable, List
if TYPE_CHECKING:
from llama_index.legacy.bridge.langchain import Document as LCDocument
from llama_index.legacy.bridge.pydantic import Field
from llama_index.legacy.schema import BaseComponent, Document
cla... | [
"llama_index.legacy.bridge.pydantic.Field"
] | [((1225, 1327), 'llama_index.legacy.bridge.pydantic.Field', 'Field', ([], {'default': '(False)', 'description': '"""Whether the data is loaded from a remote API or a local file."""'}), "(default=False, description=\n 'Whether the data is loaded from a remote API or a local file.')\n", (1230, 1327), False, 'from llam... |
"""
Portkey integration with Llama_index for enhanced monitoring.
"""
from typing import TYPE_CHECKING, Any, Callable, List, Optional, Sequence, Union, cast
from llama_index.legacy.bridge.pydantic import Field, PrivateAttr
from llama_index.legacy.core.llms.types import (
ChatMessage,
ChatResponse,
ChatRes... | [
"llama_index.legacy.llms.base.llm_chat_callback",
"llama_index.legacy.core.llms.types.ChatResponse",
"llama_index.legacy.llms.generic_utils.stream_chat_to_completion_decorator",
"llama_index.legacy.llms.portkey_utils.is_chat_model",
"llama_index.legacy.core.llms.types.ChatMessage",
"llama_index.legacy.llm... | [((1284, 1347), 'llama_index.legacy.bridge.pydantic.Field', 'Field', ([], {'description': '"""The mode for using the Portkey integration"""'}), "(description='The mode for using the Portkey integration')\n", (1289, 1347), False, 'from llama_index.legacy.bridge.pydantic import Field, PrivateAttr\n'), ((1390, 1426), 'lla... |
"""
Portkey integration with Llama_index for enhanced monitoring.
"""
from typing import TYPE_CHECKING, Any, Callable, List, Optional, Sequence, Union, cast
from llama_index.legacy.bridge.pydantic import Field, PrivateAttr
from llama_index.legacy.core.llms.types import (
ChatMessage,
ChatResponse,
ChatRes... | [
"llama_index.legacy.llms.base.llm_chat_callback",
"llama_index.legacy.core.llms.types.ChatResponse",
"llama_index.legacy.llms.generic_utils.stream_chat_to_completion_decorator",
"llama_index.legacy.llms.portkey_utils.is_chat_model",
"llama_index.legacy.core.llms.types.ChatMessage",
"llama_index.legacy.llm... | [((1284, 1347), 'llama_index.legacy.bridge.pydantic.Field', 'Field', ([], {'description': '"""The mode for using the Portkey integration"""'}), "(description='The mode for using the Portkey integration')\n", (1289, 1347), False, 'from llama_index.legacy.bridge.pydantic import Field, PrivateAttr\n'), ((1390, 1426), 'lla... |
"""Query plan tool."""
from typing import Any, Dict, List, Optional
from llama_index.core.bridge.pydantic import BaseModel, Field
from llama_index.core.response_synthesizers import (
BaseSynthesizer,
get_response_synthesizer,
)
from llama_index.core.schema import NodeWithScore, TextNode
from llama_index.core.... | [
"llama_index.core.schema.TextNode",
"llama_index.core.bridge.pydantic.Field",
"llama_index.core.tools.types.ToolMetadata",
"llama_index.core.schema.NodeWithScore",
"llama_index.core.response_synthesizers.get_response_synthesizer",
"llama_index.core.utils.print_text"
] | [((1418, 1465), 'llama_index.core.bridge.pydantic.Field', 'Field', (['...'], {'description': '"""ID of the query node."""'}), "(..., description='ID of the query node.')\n", (1423, 1465), False, 'from llama_index.core.bridge.pydantic import BaseModel, Field\n'), ((1487, 1535), 'llama_index.core.bridge.pydantic.Field', ... |
"""Query plan tool."""
from typing import Any, Dict, List, Optional
from llama_index.core.bridge.pydantic import BaseModel, Field
from llama_index.core.response_synthesizers import (
BaseSynthesizer,
get_response_synthesizer,
)
from llama_index.core.schema import NodeWithScore, TextNode
from llama_index.core.... | [
"llama_index.core.schema.TextNode",
"llama_index.core.bridge.pydantic.Field",
"llama_index.core.tools.types.ToolMetadata",
"llama_index.core.schema.NodeWithScore",
"llama_index.core.response_synthesizers.get_response_synthesizer",
"llama_index.core.utils.print_text"
] | [((1418, 1465), 'llama_index.core.bridge.pydantic.Field', 'Field', (['...'], {'description': '"""ID of the query node."""'}), "(..., description='ID of the query node.')\n", (1423, 1465), False, 'from llama_index.core.bridge.pydantic import BaseModel, Field\n'), ((1487, 1535), 'llama_index.core.bridge.pydantic.Field', ... |
"""Query plan tool."""
from typing import Any, Dict, List, Optional
from llama_index.core.bridge.pydantic import BaseModel, Field
from llama_index.core.response_synthesizers import (
BaseSynthesizer,
get_response_synthesizer,
)
from llama_index.core.schema import NodeWithScore, TextNode
from llama_index.core.... | [
"llama_index.core.schema.TextNode",
"llama_index.core.bridge.pydantic.Field",
"llama_index.core.tools.types.ToolMetadata",
"llama_index.core.schema.NodeWithScore",
"llama_index.core.response_synthesizers.get_response_synthesizer",
"llama_index.core.utils.print_text"
] | [((1418, 1465), 'llama_index.core.bridge.pydantic.Field', 'Field', (['...'], {'description': '"""ID of the query node."""'}), "(..., description='ID of the query node.')\n", (1423, 1465), False, 'from llama_index.core.bridge.pydantic import BaseModel, Field\n'), ((1487, 1535), 'llama_index.core.bridge.pydantic.Field', ... |
from typing import Any, Callable, Dict, Optional, Sequence
from llama_index.legacy.bridge.pydantic import Field, PrivateAttr
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.core.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseAsyncGen,
ChatResponseGen,
Co... | [
"llama_index.legacy.llms.watsonx_utils.WATSONX_MODELS.keys",
"llama_index.legacy.llms.base.llm_chat_callback",
"llama_index.legacy.llms.base.llm_completion_callback",
"llama_index.legacy.bridge.pydantic.PrivateAttr",
"llama_index.legacy.bridge.pydantic.Field",
"llama_index.legacy.llms.watsonx_utils.get_fr... | [((968, 1006), 'llama_index.legacy.bridge.pydantic.Field', 'Field', ([], {'description': '"""The Model to use."""'}), "(description='The Model to use.')\n", (973, 1006), False, 'from llama_index.legacy.bridge.pydantic import Field, PrivateAttr\n'), ((1033, 1095), 'llama_index.legacy.bridge.pydantic.Field', 'Field', ([]... |
from typing import Any, Callable, Dict, Optional, Sequence
from llama_index.legacy.bridge.pydantic import Field, PrivateAttr
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.core.llms.types import (
ChatMessage,
ChatResponse,
ChatResponseAsyncGen,
ChatResponseGen,
Co... | [
"llama_index.legacy.llms.watsonx_utils.WATSONX_MODELS.keys",
"llama_index.legacy.llms.base.llm_chat_callback",
"llama_index.legacy.llms.base.llm_completion_callback",
"llama_index.legacy.bridge.pydantic.PrivateAttr",
"llama_index.legacy.bridge.pydantic.Field",
"llama_index.legacy.llms.watsonx_utils.get_fr... | [((968, 1006), 'llama_index.legacy.bridge.pydantic.Field', 'Field', ([], {'description': '"""The Model to use."""'}), "(description='The Model to use.')\n", (973, 1006), False, 'from llama_index.legacy.bridge.pydantic import Field, PrivateAttr\n'), ((1033, 1095), 'llama_index.legacy.bridge.pydantic.Field', 'Field', ([]... |
from typing import Any, Awaitable, Callable, Dict, Optional, Sequence
from llama_index.legacy.bridge.pydantic import Field
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.constants import DEFAULT_TEMPERATURE
from llama_index.legacy.core.llms.types import (
ChatMessage,
ChatResp... | [
"llama_index.legacy.llms.generic_utils.astream_chat_to_completion_decorator",
"llama_index.legacy.llms.base.llm_chat_callback",
"llama_index.legacy.llms.litellm_utils.completion_with_retry",
"llama_index.legacy.llms.generic_utils.stream_chat_to_completion_decorator",
"llama_index.legacy.llms.litellm_utils.a... | [((1378, 1535), 'llama_index.legacy.bridge.pydantic.Field', 'Field', ([], {'default': 'DEFAULT_LITELLM_MODEL', 'description': '"""The LiteLLM model to use. For complete list of providers https://docs.litellm.ai/docs/providers"""'}), "(default=DEFAULT_LITELLM_MODEL, description=\n 'The LiteLLM model to use. For compl... |
from typing import Any, Awaitable, Callable, Dict, Optional, Sequence
from llama_index.legacy.bridge.pydantic import Field
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.constants import DEFAULT_TEMPERATURE
from llama_index.legacy.core.llms.types import (
ChatMessage,
ChatResp... | [
"llama_index.legacy.llms.generic_utils.astream_chat_to_completion_decorator",
"llama_index.legacy.llms.base.llm_chat_callback",
"llama_index.legacy.llms.litellm_utils.completion_with_retry",
"llama_index.legacy.llms.generic_utils.stream_chat_to_completion_decorator",
"llama_index.legacy.llms.litellm_utils.a... | [((1378, 1535), 'llama_index.legacy.bridge.pydantic.Field', 'Field', ([], {'default': 'DEFAULT_LITELLM_MODEL', 'description': '"""The LiteLLM model to use. For complete list of providers https://docs.litellm.ai/docs/providers"""'}), "(default=DEFAULT_LITELLM_MODEL, description=\n 'The LiteLLM model to use. For compl... |
import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core import VectorStoreIndex
async def main():
# DOWNLOAD LLAMADATASET
rag_dataset, documents = download_llama_dataset("MiniTruthfulQADataset", "./data... | [
"llama_index.core.VectorStoreIndex.from_documents",
"llama_index.core.llama_dataset.download_llama_dataset",
"llama_index.core.llama_pack.download_llama_pack"
] | [((265, 322), 'llama_index.core.llama_dataset.download_llama_dataset', 'download_llama_dataset', (['"""MiniTruthfulQADataset"""', '"""./data"""'], {}), "('MiniTruthfulQADataset', './data')\n", (287, 322), False, 'from llama_index.core.llama_dataset import download_llama_dataset\n'), ((367, 419), 'llama_index.core.Vecto... |
import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core import VectorStoreIndex
async def main():
# DOWNLOAD LLAMADATASET
rag_dataset, documents = download_llama_dataset("MiniTruthfulQADataset", "./data... | [
"llama_index.core.VectorStoreIndex.from_documents",
"llama_index.core.llama_dataset.download_llama_dataset",
"llama_index.core.llama_pack.download_llama_pack"
] | [((265, 322), 'llama_index.core.llama_dataset.download_llama_dataset', 'download_llama_dataset', (['"""MiniTruthfulQADataset"""', '"""./data"""'], {}), "('MiniTruthfulQADataset', './data')\n", (287, 322), False, 'from llama_index.core.llama_dataset import download_llama_dataset\n'), ((367, 419), 'llama_index.core.Vecto... |
from typing import Any, Callable, Dict, Optional, Sequence
from llama_index.legacy.bridge.pydantic import Field, PrivateAttr
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.constants import DEFAULT_TEMPERATURE
# from mistralai.models.chat_completion import ChatMessage
from llama_index... | [
"llama_index.legacy.llms.generic_utils.astream_chat_to_completion_decorator",
"llama_index.legacy.llms.base.llm_chat_callback",
"llama_index.legacy.llms.generic_utils.get_from_param_or_env",
"llama_index.legacy.llms.generic_utils.stream_chat_to_completion_decorator",
"llama_index.legacy.core.llms.types.Chat... | [((1271, 1357), 'llama_index.legacy.bridge.pydantic.Field', 'Field', ([], {'default': 'DEFAULT_MISTRALAI_MODEL', 'description': '"""The mistralai model to use."""'}), "(default=DEFAULT_MISTRALAI_MODEL, description=\n 'The mistralai model to use.')\n", (1276, 1357), False, 'from llama_index.legacy.bridge.pydantic imp... |
from typing import Any, Callable, Dict, Optional, Sequence
from llama_index.legacy.bridge.pydantic import Field, PrivateAttr
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.constants import DEFAULT_TEMPERATURE
# from mistralai.models.chat_completion import ChatMessage
from llama_index... | [
"llama_index.legacy.llms.generic_utils.astream_chat_to_completion_decorator",
"llama_index.legacy.llms.base.llm_chat_callback",
"llama_index.legacy.llms.generic_utils.get_from_param_or_env",
"llama_index.legacy.llms.generic_utils.stream_chat_to_completion_decorator",
"llama_index.legacy.core.llms.types.Chat... | [((1271, 1357), 'llama_index.legacy.bridge.pydantic.Field', 'Field', ([], {'default': 'DEFAULT_MISTRALAI_MODEL', 'description': '"""The mistralai model to use."""'}), "(default=DEFAULT_MISTRALAI_MODEL, description=\n 'The mistralai model to use.')\n", (1276, 1357), False, 'from llama_index.legacy.bridge.pydantic imp... |
"""Base index classes."""
import logging
from abc import ABC, abstractmethod
from typing import Any, Dict, Generic, List, Optional, Sequence, Type, TypeVar, cast
from llama_index.legacy.chat_engine.types import BaseChatEngine, ChatMode
from llama_index.legacy.core.base_query_engine import BaseQueryEngine
from llama_i... | [
"llama_index.legacy.query_engine.retriever_query_engine.RetrieverQueryEngine.from_args",
"llama_index.legacy.chat_engine.CondenseQuestionChatEngine.from_defaults",
"llama_index.legacy.tools.query_engine.QueryEngineTool.from_defaults",
"llama_index.legacy.chat_engine.SimpleChatEngine.from_defaults",
"llama_i... | [((793, 825), 'typing.TypeVar', 'TypeVar', (['"""IS"""'], {'bound': 'IndexStruct'}), "('IS', bound=IndexStruct)\n", (800, 825), False, 'from typing import Any, Dict, Generic, List, Optional, Sequence, Type, TypeVar, cast\n'), ((838, 877), 'typing.TypeVar', 'TypeVar', (['"""IndexType"""'], {'bound': '"""BaseIndex"""'}),... |
"""Base index classes."""
import logging
from abc import ABC, abstractmethod
from typing import Any, Dict, Generic, List, Optional, Sequence, Type, TypeVar, cast
from llama_index.legacy.chat_engine.types import BaseChatEngine, ChatMode
from llama_index.legacy.core.base_query_engine import BaseQueryEngine
from llama_i... | [
"llama_index.legacy.query_engine.retriever_query_engine.RetrieverQueryEngine.from_args",
"llama_index.legacy.chat_engine.CondenseQuestionChatEngine.from_defaults",
"llama_index.legacy.tools.query_engine.QueryEngineTool.from_defaults",
"llama_index.legacy.chat_engine.SimpleChatEngine.from_defaults",
"llama_i... | [((793, 825), 'typing.TypeVar', 'TypeVar', (['"""IS"""'], {'bound': 'IndexStruct'}), "('IS', bound=IndexStruct)\n", (800, 825), False, 'from typing import Any, Dict, Generic, List, Optional, Sequence, Type, TypeVar, cast\n'), ((838, 877), 'typing.TypeVar', 'TypeVar', (['"""IndexType"""'], {'bound': '"""BaseIndex"""'}),... |
import json
from typing import Any, Callable, Dict, Optional, Sequence
from llama_index.legacy.bridge.pydantic import Field, PrivateAttr
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.constants import (
DEFAULT_TEMPERATURE,
)
from llama_index.legacy.core.llms.types import (
Ch... | [
"llama_index.legacy.llms.base.llm_chat_callback",
"llama_index.legacy.llms.generic_utils.stream_completion_response_to_chat_response",
"llama_index.legacy.llms.base.llm_completion_callback",
"llama_index.legacy.bridge.pydantic.PrivateAttr",
"llama_index.legacy.core.llms.types.LLMMetadata",
"llama_index.le... | [((1084, 1145), 'llama_index.legacy.bridge.pydantic.Field', 'Field', ([], {'description': '"""The modelId of the Bedrock model to use."""'}), "(description='The modelId of the Bedrock model to use.')\n", (1089, 1145), False, 'from llama_index.legacy.bridge.pydantic import Field, PrivateAttr\n'), ((1171, 1228), 'llama_i... |
import json
from typing import Any, Callable, Dict, Optional, Sequence
from llama_index.legacy.bridge.pydantic import Field, PrivateAttr
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.constants import (
DEFAULT_TEMPERATURE,
)
from llama_index.legacy.core.llms.types import (
Ch... | [
"llama_index.legacy.llms.base.llm_chat_callback",
"llama_index.legacy.llms.generic_utils.stream_completion_response_to_chat_response",
"llama_index.legacy.llms.base.llm_completion_callback",
"llama_index.legacy.bridge.pydantic.PrivateAttr",
"llama_index.legacy.core.llms.types.LLMMetadata",
"llama_index.le... | [((1084, 1145), 'llama_index.legacy.bridge.pydantic.Field', 'Field', ([], {'description': '"""The modelId of the Bedrock model to use."""'}), "(description='The modelId of the Bedrock model to use.')\n", (1089, 1145), False, 'from llama_index.legacy.bridge.pydantic import Field, PrivateAttr\n'), ((1171, 1228), 'llama_i... |
import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core import VectorStoreIndex
async def main():
# DOWNLOAD LLAMADATASET
rag_dataset, documents = download_llama_dataset(
"BraintrustCodaHelpDesk... | [
"llama_index.core.VectorStoreIndex.from_documents",
"llama_index.core.llama_dataset.download_llama_dataset",
"llama_index.core.llama_pack.download_llama_pack"
] | [((265, 344), 'llama_index.core.llama_dataset.download_llama_dataset', 'download_llama_dataset', (['"""BraintrustCodaHelpDeskDataset"""', '"""./braintrust_codahdd"""'], {}), "('BraintrustCodaHelpDeskDataset', './braintrust_codahdd')\n", (287, 344), False, 'from llama_index.core.llama_dataset import download_llama_datas... |
import asyncio
from llama_index.core.llama_dataset import download_llama_dataset
from llama_index.core.llama_pack import download_llama_pack
from llama_index.core import VectorStoreIndex
async def main():
# DOWNLOAD LLAMADATASET
rag_dataset, documents = download_llama_dataset(
"BraintrustCodaHelpDesk... | [
"llama_index.core.VectorStoreIndex.from_documents",
"llama_index.core.llama_dataset.download_llama_dataset",
"llama_index.core.llama_pack.download_llama_pack"
] | [((265, 344), 'llama_index.core.llama_dataset.download_llama_dataset', 'download_llama_dataset', (['"""BraintrustCodaHelpDeskDataset"""', '"""./braintrust_codahdd"""'], {}), "('BraintrustCodaHelpDeskDataset', './braintrust_codahdd')\n", (287, 344), False, 'from llama_index.core.llama_dataset import download_llama_datas... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.