llama_index の API リファレンス
llama_index (run-llama/llama_index) の公開 API 400 件 —— クラス 157、関数 54、メソッド 189。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。
リポジトリ: run-llama/llama_index
| 種別 | 件数 |
|---|---|
| クラス | 157 |
| 関数 | 54 |
| メソッド | 189 |
API 一覧
func
llama-dev.llama_dev.release.changelog.changelog(obj:dict, dry_run:bool) -> NoneGenerate the changelog in markdown syntax.
func
llama-dev.llama_dev.utils.bump_version(current_version:str, bump_type:BumpType) -> strBump a version string according to semver rules.
func
llama-dev.llama_dev.utils.find_all_packages(root_path:Path) -> list[Path]Returns a list of all the package folders in the monorepo.
func
llama-dev.llama_dev.utils.find_integrations(root_path:Path, recursive=False) -> list[Path]Find all integrations packages in the repo.
func
llama-dev.llama_dev.utils.find_utils(root_path:Path) -> list[Path]Find all llama-index-utils packages in the repo.
func
llama-dev.llama_dev.utils.get_dep_names(pyproject_data:dict) -> set[str]Load dependencies from pyproject.toml.
func
llama-dev.llama_dev.utils.get_dependants_packages(changed_packages:set[Path], all_packages:list[Path]) -> set[Path]Get packages containing the files in the changeset.
func
llama-dev.llama_dev.utils.is_llama_index_package(package_path:Path) -> boolReturns whether a folder contains a 'pyproject.toml' file.
func
llama-dev.llama_dev.utils.load_pyproject(package_path:Path) -> dictThin wrapper around tomli.load().
func
llama-dev.llama_dev.utils.package_has_tests(package_path:Path) -> boolReturns whether a package folder contains a 'tests' subfolder.
func
llama-dev.llama_dev.utils.update_pyproject_version(package_path:Path, new_version:str) -> NoneUpdate the version in a pyproject.toml file.
class
llama-index-core.llama_index.core.agent.react.formatter.BaseAgentChatFormatterBase chat formatter.
method
llama-index-core.llama_index.core.agent.react.formatter.BaseAgentChatFormatter.format(tools:Sequence[BaseTool], chat_history:List[ChatMessage], current_reasoning:Optional[List[BaseReasoningStep]]=None) -> List[ChatMessage]Format chat history into list of ChatMessage.
class
llama-index-core.llama_index.core.agent.react.formatter.ReActChatFormatterReAct chat formatter.
method
llama-index-core.llama_index.core.agent.react.formatter.ReActChatFormatter.from_context(context:str) -> 'ReActChatFormatter'Create ReActChatFormatter from context.
func
llama-index-core.llama_index.core.agent.react.formatter.get_react_tool_descriptions(tools:Sequence[BaseTool]) -> List[str]Tool.
class
llama-index-core.llama_index.core.agent.react.output_parser.ReActOutputParserReAct Output parser.
method
llama-index-core.llama_index.core.agent.react.output_parser.ReActOutputParser.parse(output:str, is_streaming:bool=False) -> BaseReasoningStepParse output from ReAct agent.
func
llama-index-core.llama_index.core.agent.react.output_parser.parse_action_reasoning_step(output:str) -> ActionReasoningStepParse an action reasoning step from the LLM output.
class
llama-index-core.llama_index.core.agent.react.types.ActionReasoningStepAction Reasoning step.
method
llama-index-core.llama_index.core.agent.react.types.ActionReasoningStep.get_content() -> strGet content.
method
llama-index-core.llama_index.core.agent.react.types.ActionReasoningStep.is_done() -> boolIs the reasoning step the last one.
class
llama-index-core.llama_index.core.agent.react.types.BaseReasoningStepReasoning step.
method
llama-index-core.llama_index.core.agent.react.types.BaseReasoningStep.get_content() -> strGet content.
method
llama-index-core.llama_index.core.agent.react.types.BaseReasoningStep.is_done() -> boolIs the reasoning step the last one.
class
llama-index-core.llama_index.core.agent.react.types.ObservationReasoningStepObservation reasoning step.
method
llama-index-core.llama_index.core.agent.react.types.ObservationReasoningStep.get_content() -> strGet content.
method
llama-index-core.llama_index.core.agent.react.types.ObservationReasoningStep.is_done() -> boolIs the reasoning step the last one.
class
llama-index-core.llama_index.core.agent.react.types.ResponseReasoningStepResponse reasoning step.
method
llama-index-core.llama_index.core.agent.react.types.ResponseReasoningStep.get_content() -> strGet content.
method
llama-index-core.llama_index.core.agent.react.types.ResponseReasoningStep.is_done() -> boolIs the reasoning step the last one.
method
llama-index-core.llama_index.core.agent.workflow.agent_context.AgentContext.write_event_to_stream(event:Any) -> NoneWrite an event to the output stream.
class
llama-index-core.llama_index.core.agent.workflow.codeact_agent.CodeActAgentA workflow agent that can execute code.
method
llama-index-core.llama_index.core.agent.workflow.codeact_agent.CodeActAgent.finalize(ctx:Context, output:AgentOutput, memory:BaseMemory) -> AgentOutputFinalize the code act agent.
class
llama-index-core.llama_index.core.agent.workflow.function_agent.FunctionAgentFunction calling agent implementation.
method
llama-index-core.llama_index.core.agent.workflow.function_agent.FunctionAgent.finalize(ctx:Context, output:AgentOutput, memory:BaseMemory) -> AgentOutputFinalize the function calling agent.
func
llama-index-core.llama_index.core.agent.workflow.multi_agent_workflow.handoff(ctx:Context, to_agent:str, reason:str) -> strHandoff control of that chat to the given agent.
class
llama-index-core.llama_index.core.agent.workflow.react_agent.ReActAgentReact agent implementation.
method
llama-index-core.llama_index.core.agent.workflow.react_agent.ReActAgent.finalize(ctx:Context, output:AgentOutput, memory:BaseMemory) -> AgentOutputFinalize the React agent.
method
llama-index-core.llama_index.core.agent.workflow.react_agent.ReActAgent.validate_formatter() -> 'ReActAgent'Validate the formatter.
class
llama-index-core.llama_index.core.agent.workflow.workflow_events.AgentInputLLM input.
class
llama-index-core.llama_index.core.agent.workflow.workflow_events.AgentOutputLLM output.
class
llama-index-core.llama_index.core.agent.workflow.workflow_events.AgentSetupAgent setup.
class
llama-index-core.llama_index.core.agent.workflow.workflow_events.AgentStreamAgent stream.
class
llama-index-core.llama_index.core.agent.workflow.workflow_events.AgentStreamStructuredOutputStream the structured output
class
llama-index-core.llama_index.core.agent.workflow.workflow_events.ToolCallAll tool calls are surfaced.
class
llama-index-core.llama_index.core.agent.workflow.workflow_events.ToolCallResultTool call result.
func
llama-index-core.llama_index.core.async_utils.asyncio_run(coro:Coroutine) -> AnyGets an existing event loop to run the coroutine.
func
llama-index-core.llama_index.core.async_utils.run_async_tasks(tasks:List[Coroutine], show_progress:bool=False, progress_bar_desc:str='Running async tasks') -> List[Any]Run a list of async tasks.
func
llama-index-core.llama_index.core.async_utils.run_jobs(jobs:List[Coroutine[Any, Any, T]], show_progress:bool=False, workers:int=DEFAULT_NUM_WORKERS, desc:Optional[str]=None) -> List[T]Run jobs.
class
llama-index-core.llama_index.core.base.base_auto_retriever.BaseAutoRetrieverBase auto retriever.
method
llama-index-core.llama_index.core.base.base_auto_retriever.BaseAutoRetriever.generate_retrieval_spec(query_bundle:QueryBundle, **kwargs:Any) -> BaseModelGenerate retrieval spec synchronously.
class
llama-index-core.llama_index.core.base.base_multi_modal_retriever.MultiModalRetrieverMulti Modal base retriever.
method
llama-index-core.llama_index.core.base.base_multi_modal_retriever.MultiModalRetriever.text_retrieve(str_or_query_bundle:QueryType) -> List[NodeWithScore]Retrieve text nodes given text query.
class
llama-index-core.llama_index.core.base.base_query_engine.BaseQueryEngineBase query engine.
class
llama-index-core.llama_index.core.base.base_retriever.BaseRetrieverBase retriever.
method
llama-index-core.llama_index.core.base.base_retriever.BaseRetriever.retrieve(str_or_query_bundle:QueryType) -> List[NodeWithScore]Retrieve nodes given query.
class
llama-index-core.llama_index.core.base.base_selector.BaseSelectorBase selector.
class
llama-index-core.llama_index.core.base.base_selector.MultiSelectionA multi-selection of choices.
class
llama-index-core.llama_index.core.base.base_selector.SingleSelectionA single selection of a choice.
class
llama-index-core.llama_index.core.base.embeddings.base.BaseEmbeddingBase class for embeddings.
method
llama-index-core.llama_index.core.base.embeddings.base.BaseEmbedding.aget_query_embedding(query:str) -> EmbeddingGet query embedding.
method
llama-index-core.llama_index.core.base.embeddings.base.BaseEmbedding.aget_text_embedding(text:str) -> EmbeddingAsync get text embedding.
method
llama-index-core.llama_index.core.base.embeddings.base.BaseEmbedding.get_query_embedding(query:str) -> EmbeddingEmbed the input query.
method
llama-index-core.llama_index.core.base.embeddings.base.BaseEmbedding.get_text_embedding(text:str) -> EmbeddingEmbed the input text.
method
llama-index-core.llama_index.core.base.embeddings.base.BaseEmbedding.similarity(embedding1:Embedding, embedding2:Embedding, mode:SimilarityMode=SimilarityMode.DEFAULT) -> floatGet embedding similarity.
class
llama-index-core.llama_index.core.base.embeddings.base.SimilarityModeModes for similarity/distance.
func
llama-index-core.llama_index.core.base.embeddings.base.mean_agg(embeddings:List[Embedding]) -> EmbeddingMean aggregation for embeddings.
func
llama-index-core.llama_index.core.base.embeddings.base.similarity(embedding1:Embedding, embedding2:Embedding, mode:SimilarityMode=SimilarityMode.DEFAULT) -> floatGet embedding similarity.
class
llama-index-core.llama_index.core.base.embeddings.base_sparse.BaseSparseEmbeddingBase class for embeddings.
method
llama-index-core.llama_index.core.base.embeddings.base_sparse.BaseSparseEmbedding.aget_query_embedding(query:str) -> SparseEmbeddingGet query embedding.
method
llama-index-core.llama_index.core.base.embeddings.base_sparse.BaseSparseEmbedding.aget_text_embedding(text:str) -> SparseEmbeddingAsync get text embedding.
method
llama-index-core.llama_index.core.base.embeddings.base_sparse.BaseSparseEmbedding.get_query_embedding(query:str) -> SparseEmbeddingEmbed the input query.
method
llama-index-core.llama_index.core.base.embeddings.base_sparse.BaseSparseEmbedding.get_text_embedding(text:str) -> SparseEmbeddingEmbed the input text.
method
llama-index-core.llama_index.core.base.embeddings.base_sparse.BaseSparseEmbedding.similarity(embedding1:SparseEmbedding, embedding2:SparseEmbedding) -> floatGet sparse embedding similarity.
func
llama-index-core.llama_index.core.base.embeddings.base_sparse.mean_agg(embeddings:List[SparseEmbedding]) -> SparseEmbeddingGet mean aggregation of embeddings.
func
llama-index-core.llama_index.core.base.embeddings.base_sparse.sparse_similarity(embedding1:SparseEmbedding, embedding2:SparseEmbedding) -> floatGet sparse embedding similarity.
class
llama-index-core.llama_index.core.base.llms.base.BaseLLMBaseLLM interface.
method
llama-index-core.llama_index.core.base.llms.base.BaseLLM.achat(messages:Sequence[ChatMessage], **kwargs:Any) -> ChatResponseAsync chat endpoint for LLM.
method
llama-index-core.llama_index.core.base.llms.base.BaseLLM.acomplete(prompt:str, formatted:bool=False, **kwargs:Any) -> CompletionResponseAsync completion endpoint for LLM.
method
llama-index-core.llama_index.core.base.llms.base.BaseLLM.astream_chat(messages:Sequence[ChatMessage], **kwargs:Any) -> ChatResponseAsyncGenAsync streaming chat endpoint for LLM.
method
llama-index-core.llama_index.core.base.llms.base.BaseLLM.chat(messages:Sequence[ChatMessage], **kwargs:Any) -> ChatResponseChat endpoint for LLM.
method
llama-index-core.llama_index.core.base.llms.base.BaseLLM.complete(prompt:str, formatted:bool=False, **kwargs:Any) -> CompletionResponseCompletion endpoint for LLM.
method
llama-index-core.llama_index.core.base.llms.base.BaseLLM.metadata() -> LLMMetadataLLM metadata.
method
llama-index-core.llama_index.core.base.llms.base.BaseLLM.stream_chat(messages:Sequence[ChatMessage], **kwargs:Any) -> ChatResponseGenStreaming chat endpoint for LLM.
method
llama-index-core.llama_index.core.base.llms.base.BaseLLM.stream_complete(prompt:str, formatted:bool=False, **kwargs:Any) -> CompletionResponseGenStreaming completion endpoint for LLM.
func
llama-index-core.llama_index.core.base.llms.generic_utils.completion_response_to_chat_response(completion_response:CompletionResponse) -> ChatResponseConvert a completion response to a chat response.
func
llama-index-core.llama_index.core.base.llms.generic_utils.image_node_to_image_block(image_node:ImageNode) -> ImageBlockGet an ImageBlock from an ImageNode.
func
llama-index-core.llama_index.core.base.llms.generic_utils.messages_to_history_str(messages:Sequence[ChatMessage]) -> strConvert messages to a history string.
func
llama-index-core.llama_index.core.base.llms.generic_utils.messages_to_prompt(messages:Sequence[ChatMessage]) -> strConvert messages to a prompt string.
func
llama-index-core.llama_index.core.base.llms.generic_utils.prompt_to_messages(prompt:str) -> List[ChatMessage]Convert a string prompt to a sequence of messages.
class
llama-index-core.llama_index.core.base.llms.types.ChatMessageChat message.
method
llama-index-core.llama_index.core.base.llms.types.ChatMessage.legacy_additional_kwargs_image() -> SelfProvided for backward compatibility.
class
llama-index-core.llama_index.core.base.llms.types.ChatResponseChat response.
class
llama-index-core.llama_index.core.base.llms.types.CompletionResponseCompletion response.
class
llama-index-core.llama_index.core.base.llms.types.LogProbLogProb of a token.
class
llama-index-core.llama_index.core.base.llms.types.MessageRoleMessage role.
class
llama-index-core.llama_index.core.base.llms.types.TextBlockA representation of text data to directly pass to/from the LLM.
class
llama-index-core.llama_index.core.base.response.schema.AsyncStreamingResponseAsyncStreamingResponse object.
method
llama-index-core.llama_index.core.base.response.schema.AsyncStreamingResponse.async_response_gen() -> TokenAsyncGenYield the string response.
method
llama-index-core.llama_index.core.base.response.schema.AsyncStreamingResponse.get_formatted_sources(length:int=100, trim_text:int=True) -> strGet formatted sources text.
method
llama-index-core.llama_index.core.base.response.schema.AsyncStreamingResponse.get_response() -> ResponseGet a standard response object.
method
llama-index-core.llama_index.core.base.response.schema.AsyncStreamingResponse.print_response_stream() -> NonePrint the response stream.
class
llama-index-core.llama_index.core.base.response.schema.PydanticResponsePydanticResponse object.
method
llama-index-core.llama_index.core.base.response.schema.PydanticResponse.get_formatted_sources(length:int=100) -> strGet formatted sources text.
method
llama-index-core.llama_index.core.base.response.schema.PydanticResponse.get_response() -> ResponseGet a standard response object.
class
llama-index-core.llama_index.core.base.response.schema.ResponseResponse object.
method
llama-index-core.llama_index.core.base.response.schema.Response.get_formatted_sources(length:int=100) -> strGet formatted sources text.
class
llama-index-core.llama_index.core.base.response.schema.StreamingResponseStreamingResponse object.
method
llama-index-core.llama_index.core.base.response.schema.StreamingResponse.get_formatted_sources(length:int=100, trim_text:int=True) -> strGet formatted sources text.
method
llama-index-core.llama_index.core.base.response.schema.StreamingResponse.get_response() -> ResponseGet a standard response object.
method
llama-index-core.llama_index.core.base.response.schema.StreamingResponse.print_response_stream() -> NonePrint the response stream.
method
llama-index-core.llama_index.core.callbacks.base.CallbackManager.add_handler(handler:BaseCallbackHandler) -> NoneAdd a handler to the callback manager.
method
llama-index-core.llama_index.core.callbacks.base.CallbackManager.as_trace(trace_id:str) -> Generator[None, None, None]Context manager tracer for lanching and shutdown of traces.
method
llama-index-core.llama_index.core.callbacks.base.CallbackManager.end_trace(trace_id:Optional[str]=None, trace_map:Optional[Dict[str, List[str]]]=None) -> NoneRun when an overall trace is exited.
method
llama-index-core.llama_index.core.callbacks.base.CallbackManager.event(event_type:CBEventType, payload:Optional[Dict[str, Any]]=None, event_id:Optional[str]=None) -> Generator['EventContext', None, None]Context manager for lanching and shutdown of events.
method
llama-index-core.llama_index.core.callbacks.base.CallbackManager.on_event_end(event_type:CBEventType, payload:Optional[Dict[str, Any]]=None, event_id:Optional[str]=None, **kwargs:Any) -> NoneRun handlers when an event ends.
method
llama-index-core.llama_index.core.callbacks.base.CallbackManager.remove_handler(handler:BaseCallbackHandler) -> NoneRemove a handler from the callback manager.
method
llama-index-core.llama_index.core.callbacks.base.CallbackManager.start_trace(trace_id:Optional[str]=None) -> NoneRun when an overall trace is launched.
method
llama-index-core.llama_index.core.callbacks.base_handler.BaseCallbackHandler.on_event_end(event_type:CBEventType, payload:Optional[Dict[str, Any]]=None, event_id:str='', **kwargs:Any) -> NoneRun when an event ends.
method
llama-index-core.llama_index.core.callbacks.base_handler.BaseCallbackHandler.start_trace(trace_id:Optional[str]=None) -> NoneRun when an overall trace is launched.
func
llama-index-core.llama_index.core.callbacks.global_handlers.create_global_handler(eval_mode:str, **eval_params:Any) -> Optional[BaseCallbackHandler]Get global eval handler.
func
llama-index-core.llama_index.core.callbacks.global_handlers.set_global_handler(eval_mode:str, **eval_params:Any) -> NoneSet global eval handlers.
method
llama-index-core.llama_index.core.callbacks.llama_debug.LlamaDebugHandler.end_trace(trace_id:Optional[str]=None, trace_map:Optional[Dict[str, List[str]]]=None) -> NoneShutdown the current trace.
method
llama-index-core.llama_index.core.callbacks.llama_debug.LlamaDebugHandler.flush_event_logs() -> NoneClear all events from memory.
method
llama-index-core.llama_index.core.callbacks.llama_debug.LlamaDebugHandler.get_events(event_type:Optional[CBEventType]=None) -> List[CBEvent]Get all events for a specific event type.
method
llama-index-core.llama_index.core.callbacks.llama_debug.LlamaDebugHandler.start_trace(trace_id:Optional[str]=None) -> NoneLaunch a trace.
class
llama-index-core.llama_index.core.callbacks.schema.CBEventGeneric class to store event information.
class
llama-index-core.llama_index.core.callbacks.schema.CBEventTypeCallback manager event types.
class
llama-index-core.llama_index.core.callbacks.schema.EventStatsTime-based Statistics for events.
func
llama-index-core.llama_index.core.callbacks.utils.trace_method(trace_id:str, callback_manager_attr:str='callback_manager') -> Callable[[Callable], Callable]Decorator to trace a method.
class
llama-index-core.llama_index.core.chat_engine.condense_question.CondenseQuestionChatEngineCondense Question Chat Engine.
method
llama-index-core.llama_index.core.chat_engine.condense_question.CondenseQuestionChatEngine.chat_history() -> List[ChatMessage]Get chat history.
class
llama-index-core.llama_index.core.chat_engine.context.ContextChatEngineContext Chat Engine.
method
llama-index-core.llama_index.core.chat_engine.context.ContextChatEngine.chat_history() -> List[ChatMessage]Get chat history.
class
llama-index-core.llama_index.core.chat_engine.multi_modal_context.MultiModalContextChatEngineMultimodal Context Chat Engine.
method
llama-index-core.llama_index.core.chat_engine.multi_modal_context.MultiModalContextChatEngine.chat_history() -> List[ChatMessage]Get chat history.
class
llama-index-core.llama_index.core.chat_engine.simple.SimpleChatEngineSimple Chat Engine.
method
llama-index-core.llama_index.core.chat_engine.simple.SimpleChatEngine.chat_history() -> List[ChatMessage]Get chat history.
class
llama-index-core.llama_index.core.chat_engine.types.AgentChatResponseAgent chat response.
method
llama-index-core.llama_index.core.chat_engine.types.AgentChatResponse.async_response_gen() -> AsyncGenerator[str, None]Used for fake streaming, i.e.
method
llama-index-core.llama_index.core.chat_engine.types.AgentChatResponse.response_gen() -> Generator[str, None, None]Used for fake streaming, i.e.
class
llama-index-core.llama_index.core.chat_engine.types.BaseChatEngineBase Chat Engine.
method
llama-index-core.llama_index.core.chat_engine.types.BaseChatEngine.achat(message:str, chat_history:Optional[List[ChatMessage]]=None) -> AGENT_CHAT_RESPONSE_TYPEAsync version of main chat interface.
method
llama-index-core.llama_index.core.chat_engine.types.BaseChatEngine.chat(message:str, chat_history:Optional[List[ChatMessage]]=None) -> AGENT_CHAT_RESPONSE_TYPEMain chat interface.
method
llama-index-core.llama_index.core.chat_engine.types.BaseChatEngine.chat_repl() -> NoneEnter interactive chat REPL.
method
llama-index-core.llama_index.core.chat_engine.types.BaseChatEngine.reset() -> NoneReset conversation state.
method
llama-index-core.llama_index.core.chat_engine.types.BaseChatEngine.stream_chat(message:str, chat_history:Optional[List[ChatMessage]]=None) -> StreamingAgentChatResponseStream chat interface.
class
llama-index-core.llama_index.core.chat_engine.types.ChatModeChat Engine Modes.
func
llama-index-core.llama_index.core.chat_engine.types.is_function(message:ChatMessage) -> boolUtility for ChatMessage responses from OpenAI models.
class
llama-index-core.llama_index.core.composability.joint_qa_summary.QASummaryQueryEngineBuilderJoint QA Summary graph builder.
method
llama-index-core.llama_index.core.composability.joint_qa_summary.QASummaryQueryEngineBuilder.build_from_documents(documents:Sequence[Document]) -> RouterQueryEngineBuild query engine.
class
llama-index-core.llama_index.core.data_structs.data_structs.EmptyIndexStructEmpty index.
method
llama-index-core.llama_index.core.data_structs.data_structs.EmptyIndexStruct.get_type() -> IndexStructTypeGet type.
class
llama-index-core.llama_index.core.data_structs.data_structs.IndexDictA simple dictionary of documents.
method
llama-index-core.llama_index.core.data_structs.data_structs.IndexDict.delete(doc_id:str) -> NoneDelete a Node.
method
llama-index-core.llama_index.core.data_structs.data_structs.IndexDict.get_type() -> IndexStructTypeGet type.
class
llama-index-core.llama_index.core.data_structs.data_structs.IndexGraphA graph representing the tree-structured index.
method
llama-index-core.llama_index.core.data_structs.data_structs.IndexGraph.get_children(parent_node:Optional[BaseNode]) -> Dict[int, str]Get children nodes.
method
llama-index-core.llama_index.core.data_structs.data_structs.IndexGraph.get_index(node:BaseNode) -> intGet index of node.
method
llama-index-core.llama_index.core.data_structs.data_structs.IndexGraph.get_type() -> IndexStructTypeGet type.
method
llama-index-core.llama_index.core.data_structs.data_structs.IndexGraph.insert(node:BaseNode, index:Optional[int]=None, children_nodes:Optional[Sequence[BaseNode]]=None) -> NoneInsert node.
method
llama-index-core.llama_index.core.data_structs.data_structs.IndexGraph.insert_under_parent(node:BaseNode, parent_node:Optional[BaseNode], new_index:Optional[int]=None) -> NoneInsert under parent node.
method
llama-index-core.llama_index.core.data_structs.data_structs.IndexGraph.node_id_to_index() -> Dict[str, int]Map from node id to index.
method
llama-index-core.llama_index.core.data_structs.data_structs.IndexGraph.size() -> intGet the size of the graph.
class
llama-index-core.llama_index.core.data_structs.data_structs.IndexListA list of documents.
method
llama-index-core.llama_index.core.data_structs.data_structs.IndexList.add_node(node:BaseNode) -> NoneAdd text to table, return current position in list.
method
llama-index-core.llama_index.core.data_structs.data_structs.IndexList.get_type() -> IndexStructTypeGet type.
class
llama-index-core.llama_index.core.data_structs.data_structs.IndexStructA base data struct for a LlamaIndex.
method
llama-index-core.llama_index.core.data_structs.data_structs.IndexStruct.get_summary() -> strGet text summary.
method
llama-index-core.llama_index.core.data_structs.data_structs.IndexStruct.get_type() -> IndexStructTypeGet index struct type.
class
llama-index-core.llama_index.core.data_structs.struct_type.IndexStructTypeIndex struct type.
class
llama-index-core.llama_index.core.data_structs.table.BaseStructTableStruct outputs.
class
llama-index-core.llama_index.core.data_structs.table.PandasStructTablePandas struct outputs.
method
llama-index-core.llama_index.core.data_structs.table.PandasStructTable.get_type() -> IndexStructTypeGet type.
class
llama-index-core.llama_index.core.data_structs.table.SQLStructTableSQL struct outputs.
method
llama-index-core.llama_index.core.data_structs.table.SQLStructTable.get_type() -> IndexStructTypeGet type.
class
llama-index-core.llama_index.core.data_structs.table.StructDatapointStruct outputs.
func
llama-index-core.llama_index.core.embeddings.loading.load_embed_model(data:dict) -> BaseEmbeddingLoad Embedding by name.
class
llama-index-core.llama_index.core.embeddings.mock_embed_model.MockEmbeddingMock embedding.
class
llama-index-core.llama_index.core.embeddings.mock_embed_model.MockMultiModalEmbeddingMulti-Modal Mock embedding.
class
llama-index-core.llama_index.core.embeddings.multi_modal_base.MultiModalEmbeddingBase class for Multi Modal embeddings.
method
llama-index-core.llama_index.core.embeddings.multi_modal_base.MultiModalEmbedding.aget_image_embedding(img_file_path:ImageType) -> EmbeddingGet image embedding.
method
llama-index-core.llama_index.core.embeddings.multi_modal_base.MultiModalEmbedding.get_image_embedding(img_file_path:ImageType) -> EmbeddingEmbed the input image.
func
llama-index-core.llama_index.core.embeddings.utils.load_embedding(file_path:str) -> List[float]Load embedding from file.
func
llama-index-core.llama_index.core.embeddings.utils.resolve_embed_model(embed_model:Optional[EmbedType]=None, callback_manager:Optional[CallbackManager]=None) -> BaseEmbeddingResolve embed model.
func
llama-index-core.llama_index.core.embeddings.utils.save_embedding(embedding:List[float], file_path:str) -> NoneSave embedding to file.
class
llama-index-core.llama_index.core.evaluation.answer_relevancy.AnswerRelevancyEvaluatorAnswer relevancy evaluator.
class
llama-index-core.llama_index.core.evaluation.base.BaseEvaluatorBase Evaluator class.
class
llama-index-core.llama_index.core.evaluation.base.EvaluationResultEvaluation result.
class
llama-index-core.llama_index.core.evaluation.batch_runner.BatchEvalRunnerBatch evaluation runner.
method
llama-index-core.llama_index.core.evaluation.batch_runner.BatchEvalRunner.aevaluate_queries(query_engine:BaseQueryEngine, queries:Optional[List[str]]=None, **eval_kwargs_lists:Dict[str, Any]) -> Dict[str, List[EvaluationResult]]Evaluate queries.
method
llama-index-core.llama_index.core.evaluation.batch_runner.BatchEvalRunner.evaluate_queries(query_engine:BaseQueryEngine, queries:Optional[List[str]]=None, **eval_kwargs_lists:Dict[str, Any]) -> Dict[str, List[EvaluationResult]]Evaluate queries.
func
llama-index-core.llama_index.core.evaluation.batch_runner.response_worker(semaphore:asyncio.Semaphore, query_engine:BaseQueryEngine, query:str) -> RESPONSE_TYPEGet aquery tasks with semaphore.
class
llama-index-core.llama_index.core.evaluation.context_relevancy.ContextRelevancyEvaluatorContext relevancy evaluator.
class
llama-index-core.llama_index.core.evaluation.correctness.CorrectnessEvaluatorCorrectness evaluator.
class
llama-index-core.llama_index.core.evaluation.dataset_generation.QueryResponseDatasetQuery Response Dataset.
method
llama-index-core.llama_index.core.evaluation.dataset_generation.QueryResponseDataset.from_json(path:str) -> QueryResponseDatasetLoad json.
method
llama-index-core.llama_index.core.evaluation.dataset_generation.QueryResponseDataset.from_qr_pairs(qr_pairs:List[Tuple[str, str]]) -> QueryResponseDatasetCreate from qr pairs.
method
llama-index-core.llama_index.core.evaluation.dataset_generation.QueryResponseDataset.qr_pairs() -> List[Tuple[str, str]]Get pairs.
method
llama-index-core.llama_index.core.evaluation.dataset_generation.QueryResponseDataset.questions() -> List[str]Get questions.
method
llama-index-core.llama_index.core.evaluation.dataset_generation.QueryResponseDataset.save_json(path:str) -> NoneSave json.
func
llama-index-core.llama_index.core.evaluation.eval_utils.aget_responses(questions:List[str], query_engine:BaseQueryEngine, show_progress:bool=False) -> List[str]Get responses.
func
llama-index-core.llama_index.core.evaluation.eval_utils.get_responses(*args:Any, **kwargs:Any) -> List[str]Get responses.
func
llama-index-core.llama_index.core.evaluation.eval_utils.get_results_df(eval_results_list:List[Dict[str, List[EvaluationResult]]], names:List[str], metric_keys:List[str]) -> AnyGet results df.
class
llama-index-core.llama_index.core.evaluation.faithfulness.FaithfulnessEvaluatorFaithfulness evaluator.
class
llama-index-core.llama_index.core.evaluation.guideline.GuidelineEvaluatorGuideline evaluator.
class
llama-index-core.llama_index.core.evaluation.multi_modal.faithfulness.MultiModalFaithfulnessEvaluatorMulti-Modal Faithfulness evaluator.
class
llama-index-core.llama_index.core.evaluation.multi_modal.relevancy.MultiModalRelevancyEvaluatorRelevancy evaluator.
func
llama-index-core.llama_index.core.evaluation.notebook_utils.get_retrieval_results_df(names:List[str], results_arr:List[List[RetrievalEvalResult]], metric_keys:Optional[List[str]]=None) -> AnyDisplay retrieval results.
class
llama-index-core.llama_index.core.evaluation.pairwise.EvaluationSourceTo distinguish between flipped or original.
class
llama-index-core.llama_index.core.evaluation.pairwise.PairwiseComparisonEvaluatorPairwise comparison evaluator.
class
llama-index-core.llama_index.core.evaluation.relevancy.RelevancyEvaluatorRelenvancy evaluator.
class
llama-index-core.llama_index.core.evaluation.retrieval.base.BaseRetrievalEvaluatorBase Retrieval Evaluator class.
class
llama-index-core.llama_index.core.evaluation.retrieval.base.RetrievalEvalModeEvaluation of retrieval modality.
class
llama-index-core.llama_index.core.evaluation.retrieval.base.RetrievalEvalResultRetrieval eval result.
method
llama-index-core.llama_index.core.evaluation.retrieval.base.RetrievalEvalResult.metric_vals_dict() -> Dict[str, float]Dictionary of metric values.
class
llama-index-core.llama_index.core.evaluation.retrieval.evaluator.MultiModalRetrieverEvaluatorRetriever evaluator.
class
llama-index-core.llama_index.core.evaluation.retrieval.evaluator.RetrieverEvaluatorRetriever evaluator.
class
llama-index-core.llama_index.core.evaluation.retrieval.metrics.AveragePrecisionAverage Precision (AP) metric.
class
llama-index-core.llama_index.core.evaluation.retrieval.metrics.CohereRerankRelevancyMetricCohere rerank relevancy metric.
class
llama-index-core.llama_index.core.evaluation.retrieval.metrics.PrecisionPrecision metric.
class
llama-index-core.llama_index.core.evaluation.retrieval.metrics.RecallRecall metric.
func
llama-index-core.llama_index.core.evaluation.retrieval.metrics.resolve_metrics(metrics:List[str]) -> List[Type[BaseRetrievalMetric]]Resolve metrics from list of metric names.
class
llama-index-core.llama_index.core.evaluation.retrieval.metrics_base.BaseRetrievalMetricBase class for retrieval metrics.
class
llama-index-core.llama_index.core.evaluation.retrieval.metrics_base.RetrievalMetricResultMetric result.
class
llama-index-core.llama_index.core.evaluation.semantic_similarity.SemanticSimilarityEvaluatorEmbedding similarity evaluator.
class
llama-index-core.llama_index.core.extractors.interface.BaseExtractorMetadata extractor.
method
llama-index-core.llama_index.core.extractors.interface.BaseExtractor.acall(nodes:Sequence[BaseNode], **kwargs:Any) -> List[BaseNode]Post process nodes parsed from documents.
method
llama-index-core.llama_index.core.extractors.interface.BaseExtractor.class_name() -> strGet class name.
class
llama-index-core.llama_index.core.extractors.metadata_extractors.KeywordExtractorKeyword extractor.
class
llama-index-core.llama_index.core.extractors.metadata_extractors.PydanticProgramExtractorPydantic program extractor.
method
llama-index-core.llama_index.core.extractors.metadata_extractors.PydanticProgramExtractor.aextract(nodes:Sequence[BaseNode]) -> List[Dict]Extract pydantic program.
class
llama-index-core.llama_index.core.extractors.metadata_extractors.QuestionsAnsweredExtractorQuestions answered extractor.
class
llama-index-core.llama_index.core.extractors.metadata_extractors.SummaryExtractorSummary extractor.
class
llama-index-core.llama_index.core.extractors.metadata_extractors.TitleExtractorTitle extractor.
class
llama-index-core.llama_index.core.graph_stores.simple.SimpleGraphStoreSimple Graph Store.
method
llama-index-core.llama_index.core.graph_stores.simple.SimpleGraphStore.client() -> NoneGet client.
method
llama-index-core.llama_index.core.graph_stores.simple.SimpleGraphStore.delete(subj:str, rel:str, obj:str) -> NoneDelete triplet.
method
llama-index-core.llama_index.core.graph_stores.simple.SimpleGraphStore.from_persist_dir(persist_dir:str=DEFAULT_PERSIST_DIR, fs:Optional[fsspec.AbstractFileSystem]=None) -> 'SimpleGraphStore'Load from persist dir.
method
llama-index-core.llama_index.core.graph_stores.simple.SimpleGraphStore.get(subj:str) -> List[List[str]]Get triplets.
method
llama-index-core.llama_index.core.graph_stores.simple.SimpleGraphStore.get_rel_map(subjs:Optional[List[str]]=None, depth:int=2, limit:int=30) -> Dict[str, List[List[str]]]Get depth-aware rel map.
method
llama-index-core.llama_index.core.graph_stores.simple.SimpleGraphStore.get_schema(refresh:bool=False) -> strGet the schema of the Simple Graph store.
method
llama-index-core.llama_index.core.graph_stores.simple.SimpleGraphStore.query(query:str, param_map:Optional[Dict[str, Any]]={}) -> AnyQuery the Simple Graph store.
method
llama-index-core.llama_index.core.graph_stores.simple.SimpleGraphStore.upsert_triplet(subj:str, rel:str, obj:str) -> NoneAdd triplet.
class
llama-index-core.llama_index.core.graph_stores.simple.SimpleGraphStoreDataSimple Graph Store Data container.
method
llama-index-core.llama_index.core.graph_stores.simple.SimpleGraphStoreData.get_rel_map(subjs:Optional[List[str]]=None, depth:int=2, limit:int=30) -> Dict[str, List[List[str]]]Get subjects' rel map in max depth.
class
llama-index-core.llama_index.core.graph_stores.simple_labelled.SimplePropertyGraphStoreSimple Labelled Property Graph Store.
method
llama-index-core.llama_index.core.graph_stores.simple_labelled.SimplePropertyGraphStore.client() -> AnyGet client.
method
llama-index-core.llama_index.core.graph_stores.simple_labelled.SimplePropertyGraphStore.from_dict(data:dict) -> 'SimplePropertyGraphStore'Load from dict.
method
llama-index-core.llama_index.core.graph_stores.simple_labelled.SimplePropertyGraphStore.from_persist_path(persist_path:str, fs:Optional[fsspec.AbstractFileSystem]=None) -> 'SimplePropertyGraphStore'Load from persist path.
method
llama-index-core.llama_index.core.graph_stores.simple_labelled.SimplePropertyGraphStore.get(properties:Optional[dict]=None, ids:Optional[List[str]]=None) -> List[LabelledNode]Get nodes.
method
llama-index-core.llama_index.core.graph_stores.simple_labelled.SimplePropertyGraphStore.get_rel_map(graph_nodes:List[LabelledNode], depth:int=2, limit:int=30, ignore_rels:Optional[List[str]]=None) -> List[Triplet]Get depth-aware rel map.
method
llama-index-core.llama_index.core.graph_stores.simple_labelled.SimplePropertyGraphStore.get_schema(refresh:bool=False) -> strGet the schema of the graph store.
method
llama-index-core.llama_index.core.graph_stores.simple_labelled.SimplePropertyGraphStore.get_triplets(entity_names:Optional[List[str]]=None, relation_names:Optional[List[str]]=None, properties:Optional[dict]=None, ids:Optional[List[str]]=None) -> List[Triplet]Get triplets.
method
llama-index-core.llama_index.core.graph_stores.simple_labelled.SimplePropertyGraphStore.persist(persist_path:str, fs:Optional[fsspec.AbstractFileSystem]=None) -> NonePersist the graph store to a file.
method
llama-index-core.llama_index.core.graph_stores.simple_labelled.SimplePropertyGraphStore.to_dict() -> dictConvert to dict.
method
llama-index-core.llama_index.core.graph_stores.simple_labelled.SimplePropertyGraphStore.upsert_nodes(nodes:Sequence[LabelledNode]) -> NoneAdd nodes.
method
llama-index-core.llama_index.core.graph_stores.simple_labelled.SimplePropertyGraphStore.upsert_relations(relations:List[Relation]) -> NoneAdd relations.
class
llama-index-core.llama_index.core.graph_stores.types.ChunkNodeA text chunk in a graph.
method
llama-index-core.llama_index.core.graph_stores.types.ChunkNode.id() -> strGet the node id.
class
llama-index-core.llama_index.core.graph_stores.types.EntityNodeAn entity in a graph.
method
llama-index-core.llama_index.core.graph_stores.types.EntityNode.id() -> strGet the node id.
class
llama-index-core.llama_index.core.graph_stores.types.GraphStoreAbstract graph store protocol.
method
llama-index-core.llama_index.core.graph_stores.types.GraphStore.client() -> AnyGet client.
method
llama-index-core.llama_index.core.graph_stores.types.GraphStore.delete(subj:str, rel:str, obj:str) -> NoneDelete triplet.
method
llama-index-core.llama_index.core.graph_stores.types.GraphStore.get(subj:str) -> List[List[str]]Get triplets.
method
llama-index-core.llama_index.core.graph_stores.types.GraphStore.get_rel_map(subjs:Optional[List[str]]=None, depth:int=2, limit:int=30) -> Dict[str, List[List[str]]]Get depth-aware rel map.
method
llama-index-core.llama_index.core.graph_stores.types.GraphStore.get_schema(refresh:bool=False) -> strGet the schema of the graph store.
method
llama-index-core.llama_index.core.graph_stores.types.GraphStore.persist(persist_path:str, fs:Optional[fsspec.AbstractFileSystem]=None) -> NonePersist the graph store to a file.
method
llama-index-core.llama_index.core.graph_stores.types.GraphStore.upsert_triplet(subj:str, rel:str, obj:str) -> NoneAdd triplet.
class
llama-index-core.llama_index.core.graph_stores.types.LabelledNodeAn entity in a graph.
method
llama-index-core.llama_index.core.graph_stores.types.LabelledNode.id() -> strGet the node id.
class
llama-index-core.llama_index.core.graph_stores.types.PropertyGraphStoreAbstract labelled graph store protocol.
method
llama-index-core.llama_index.core.graph_stores.types.PropertyGraphStore.aget(properties:Optional[dict]=None, ids:Optional[List[str]]=None) -> List[LabelledNode]Asynchronously get nodes with matching values.
method
llama-index-core.llama_index.core.graph_stores.types.PropertyGraphStore.aget_llama_nodes(node_ids:List[str]) -> List[BaseNode]Asynchronously get nodes.
method
llama-index-core.llama_index.core.graph_stores.types.PropertyGraphStore.aget_schema(refresh:bool=False) -> strAsynchronously get the schema of the graph store.
method
llama-index-core.llama_index.core.graph_stores.types.PropertyGraphStore.aupsert_nodes(nodes:List[LabelledNode]) -> NoneAsynchronously add nodes.
method
llama-index-core.llama_index.core.graph_stores.types.PropertyGraphStore.aupsert_relations(relations:List[Relation]) -> NoneAsynchronously add relations.
method
llama-index-core.llama_index.core.graph_stores.types.PropertyGraphStore.client() -> AnyGet client.
method
llama-index-core.llama_index.core.graph_stores.types.PropertyGraphStore.delete(entity_names:Optional[List[str]]=None, relation_names:Optional[List[str]]=None, properties:Optional[dict]=None, ids:Optional[List[str]]=None) -> NoneDelete matching data.
method
llama-index-core.llama_index.core.graph_stores.types.PropertyGraphStore.delete_llama_nodes(node_ids:Optional[List[str]]=None, ref_doc_ids:Optional[List[str]]=None) -> NoneDelete llama-index nodes.
method
llama-index-core.llama_index.core.graph_stores.types.PropertyGraphStore.get(properties:Optional[dict]=None, ids:Optional[List[str]]=None) -> List[LabelledNode]Get nodes with matching values.
method
llama-index-core.llama_index.core.graph_stores.types.PropertyGraphStore.get_llama_nodes(node_ids:List[str]) -> List[BaseNode]Get llama-index nodes.
method
llama-index-core.llama_index.core.graph_stores.types.PropertyGraphStore.get_rel_map(graph_nodes:List[LabelledNode], depth:int=2, limit:int=30, ignore_rels:Optional[List[str]]=None) -> List[Triplet]Get depth-aware rel map.
method
llama-index-core.llama_index.core.graph_stores.types.PropertyGraphStore.get_schema(refresh:bool=False) -> AnyGet the schema of the graph store.
method
llama-index-core.llama_index.core.graph_stores.types.PropertyGraphStore.get_schema_str(refresh:bool=False) -> strGet the schema of the graph store as a string.
method
llama-index-core.llama_index.core.graph_stores.types.PropertyGraphStore.persist(persist_path:str, fs:Optional[fsspec.AbstractFileSystem]=None) -> NonePersist the graph store to a file.
method
llama-index-core.llama_index.core.graph_stores.types.PropertyGraphStore.upsert_llama_nodes(llama_nodes:List[BaseNode]) -> NoneAdd llama-index nodes.
method
llama-index-core.llama_index.core.graph_stores.types.PropertyGraphStore.upsert_nodes(nodes:Sequence[LabelledNode]) -> NoneUpsert nodes.
method
llama-index-core.llama_index.core.graph_stores.types.PropertyGraphStore.upsert_relations(relations:List[Relation]) -> NoneUpsert relations.
class
llama-index-core.llama_index.core.graph_stores.types.RelationA relation connecting two entities in a graph.
method
llama-index-core.llama_index.core.graph_stores.types.Relation.id() -> strGet the relation id.
func
llama-index-core.llama_index.core.graph_stores.utils.value_sanitize(d:Any) -> AnySanitize the input dictionary or list.
class
llama-index-core.llama_index.core.image_retriever.BaseImageRetrieverBase Image Retriever Abstraction.
func
llama-index-core.llama_index.core.img_utils.b64_2_img(data:str) -> ImageFileConvert base64 encoded image string to a PIL.Image.
func
llama-index-core.llama_index.core.img_utils.img_2_b64(image:ImageFile, format:str='JPEG') -> strConvert a PIL.Image to a base64 encoded image string.
class
llama-index-core.llama_index.core.indices.base.BaseIndexBase LlamaIndex.
method
llama-index-core.llama_index.core.indices.base.BaseIndex.ainsert(document:Document, **insert_kwargs:Any) -> NoneAsynchronously insert a document.
method
llama-index-core.llama_index.core.indices.base.BaseIndex.ainsert_nodes(nodes:Sequence[BaseNode], **insert_kwargs:Any) -> NoneAsynchronously insert nodes.
method
llama-index-core.llama_index.core.indices.base.BaseIndex.as_chat_engine(chat_mode:ChatMode=ChatMode.BEST, llm:Optional[LLMType]=None, **kwargs:Any) -> BaseChatEngineConvert the index to a chat engine.
method
llama-index-core.llama_index.core.indices.base.BaseIndex.as_query_engine(llm:Optional[LLMType]=None, **kwargs:Any) -> BaseQueryEngineConvert the index to a query engine.
method
llama-index-core.llama_index.core.indices.base.BaseIndex.build_index_from_nodes(nodes:Sequence[BaseNode], **build_kwargs:Any) -> ISBuild the index from nodes.
method
llama-index-core.llama_index.core.indices.base.BaseIndex.delete(doc_id:str, **delete_kwargs:Any) -> NoneDelete a document from the index.
method
llama-index-core.llama_index.core.indices.base.BaseIndex.delete_nodes(node_ids:List[str], delete_from_docstore:bool=False, **delete_kwargs:Any) -> NoneDelete a list of nodes from the index.
method
llama-index-core.llama_index.core.indices.base.BaseIndex.delete_ref_doc(ref_doc_id:str, delete_from_docstore:bool=False, **delete_kwargs:Any) -> NoneDelete a document and it's nodes by using ref_doc_id.
method
llama-index-core.llama_index.core.indices.base.BaseIndex.index_id() -> strGet the index struct.
method
llama-index-core.llama_index.core.indices.base.BaseIndex.index_struct() -> ISGet the index struct.
method
llama-index-core.llama_index.core.indices.base.BaseIndex.insert(document:Document, **insert_kwargs:Any) -> NoneInsert a document.
method
llama-index-core.llama_index.core.indices.base.BaseIndex.insert_nodes(nodes:Sequence[BaseNode], **insert_kwargs:Any) -> NoneInsert nodes.
method
llama-index-core.llama_index.core.indices.base.BaseIndex.refresh(documents:Sequence[Document], **update_kwargs:Any) -> List[bool]Refresh an index with documents that have changed.
method
llama-index-core.llama_index.core.indices.base.BaseIndex.set_index_id(index_id:str) -> NoneSet the index id.
method
llama-index-core.llama_index.core.indices.base.BaseIndex.update(document:Document, **update_kwargs:Any) -> NoneUpdate a document and it's corresponding nodes.
method
llama-index-core.llama_index.core.indices.base.BaseIndex.update_ref_doc(document:Document, **update_kwargs:Any) -> NoneUpdate a document and it's corresponding nodes.
class
llama-index-core.llama_index.core.indices.common.struct_store.schema.SQLContextContainerSQLContextContainer.
class
llama-index-core.llama_index.core.indices.common_tree.base.GPTTreeIndexBuilderGPT tree index builder.
method
llama-index-core.llama_index.core.indices.common_tree.base.GPTTreeIndexBuilder.build_from_nodes(nodes:Sequence[BaseNode], build_tree:bool=True) -> IndexGraphBuild from text.
method
llama-index-core.llama_index.core.indices.common_tree.base.GPTTreeIndexBuilder.docstore() -> BaseDocumentStoreReturn docstore.
class
llama-index-core.llama_index.core.indices.composability.graph.ComposableGraphComposable graph.
method
llama-index-core.llama_index.core.indices.composability.graph.ComposableGraph.get_index(index_struct_id:Optional[str]=None) -> BaseIndexGet index from index struct id.
class
llama-index-core.llama_index.core.indices.document_summary.base.DocumentSummaryIndexDocument Summary Index.
method
llama-index-core.llama_index.core.indices.document_summary.base.DocumentSummaryIndex.as_retriever(retriever_mode:Union[str, _RetrieverMode]=_RetrieverMode.EMBEDDING, **kwargs:Any) -> BaseRetrieverGet retriever.
method
llama-index-core.llama_index.core.indices.document_summary.base.DocumentSummaryIndex.delete_ref_doc(ref_doc_id:str, delete_from_docstore:bool=False, **delete_kwargs:Any) -> NoneDelete a document from the index.
method
llama-index-core.llama_index.core.indices.document_summary.base.DocumentSummaryIndex.get_document_summary(doc_id:str) -> strGet document summary by doc id.
class
llama-index-core.llama_index.core.indices.empty.base.EmptyIndexEmpty Index.
class
llama-index-core.llama_index.core.indices.empty.retrievers.EmptyIndexRetrieverEmptyIndex query.
class
llama-index-core.llama_index.core.indices.keyword_table.base.BaseKeywordTableIndexBase Keyword Table Index.
class
llama-index-core.llama_index.core.indices.keyword_table.base.KeywordTableIndexKeyword Table Index.
class
llama-index-core.llama_index.core.indices.keyword_table.rake_base.RAKEKeywordTableIndexRAKE Keyword Table Index.
class
llama-index-core.llama_index.core.indices.keyword_table.retrievers.BaseKeywordTableRetrieverBase Keyword Table Retriever.
class
llama-index-core.llama_index.core.indices.keyword_table.retrievers.KeywordTableGPTRetrieverKeyword Table Index GPT Retriever.
class
llama-index-core.llama_index.core.indices.keyword_table.retrievers.KeywordTableRAKERetrieverKeyword Table Index RAKE Retriever.
class
llama-index-core.llama_index.core.indices.keyword_table.retrievers.KeywordTableSimpleRetrieverKeyword Table Index Simple Retriever.
class
llama-index-core.llama_index.core.indices.keyword_table.simple_base.SimpleKeywordTableIndexSimple Keyword Table Index.
func
llama-index-core.llama_index.core.indices.keyword_table.utils.rake_extract_keywords(text_chunk:str, max_keywords:Optional[int]=None, expand_with_subtokens:bool=True) -> Set[str]Extract keywords with RAKE.
class
llama-index-core.llama_index.core.indices.knowledge_graph.base.KnowledgeGraphIndexKnowledge Graph Index.
method
llama-index-core.llama_index.core.indices.knowledge_graph.base.KnowledgeGraphIndex.add_node(keywords:List[str], node:BaseNode) -> NoneAdd node.
method
llama-index-core.llama_index.core.indices.knowledge_graph.base.KnowledgeGraphIndex.upsert_triplet_and_node(triplet:Tuple[str, str, str], node:BaseNode, include_embeddings:bool=False) -> NoneUpsert KG triplet and node.
class
llama-index-core.llama_index.core.indices.knowledge_graph.retrievers.KGRetrieverModeQuery mode enum for Knowledge Graphs.
class
llama-index-core.llama_index.core.indices.knowledge_graph.retrievers.KGTableRetrieverKG Table Retriever.
class
llama-index-core.llama_index.core.indices.knowledge_graph.retrievers.KnowledgeGraphRAGRetrieverKnowledge Graph RAG retriever.
class
llama-index-core.llama_index.core.indices.list.base.SummaryIndexSummary Index.
class
llama-index-core.llama_index.core.indices.list.retrievers.SummaryIndexLLMRetrieverLLM retriever for SummaryIndex.
func
llama-index-core.llama_index.core.indices.loading.load_index_from_storage(storage_context:StorageContext, index_id:Optional[str]=None, **kwargs:Any) -> BaseIndexLoad index from storage context.
class
llama-index-core.llama_index.core.indices.managed.base.BaseManagedIndexManaged Index.
method
llama-index-core.llama_index.core.indices.managed.base.BaseManagedIndex.as_retriever(**kwargs:Any) -> BaseRetrieverReturn a Retriever for this managed index.
class
llama-index-core.llama_index.core.indices.managed.types.ManagedIndexQueryModeManaged Index query mode.
class
llama-index-core.llama_index.core.indices.multi_modal.base.MultiModalVectorStoreIndexMulti-Modal Vector Store Index.
class
llama-index-core.llama_index.core.indices.multi_modal.retriever.MultiModalVectorIndexRetrieverMulti Modal Vector index retriever.
method
llama-index-core.llama_index.core.indices.multi_modal.retriever.MultiModalVectorIndexRetriever.similarity_top_k() -> intReturn similarity top k.
class
llama-index-core.llama_index.core.indices.prompt_helper.ChatPromptHelperChat Prompt helper.
class
llama-index-core.llama_index.core.indices.prompt_helper.PromptHelperPrompt helper.
class
llama-index-core.llama_index.core.indices.property_graph.base.PropertyGraphIndexAn index for a property graph.
func
llama-index-core.llama_index.core.indices.property_graph.transformations.schema_llm.SchemaLLMPathExtractor.validate(v:Any) -> AnyValidate triplets.
class
llama-index-core.llama_index.core.indices.property_graph.transformations.simple_llm.SimpleLLMPathExtractorExtract triples from a graph.
func
llama-index-core.llama_index.core.indices.property_graph.transformations.utils.get_entity_class(possible_entities:TypeAlias, possible_entity_props:Optional[List[str]], strict:bool, clean_additional_properties:bool=False) -> AnyGet entity class.
func
llama-index-core.llama_index.core.indices.property_graph.transformations.utils.get_relation_class(possible_relations:TypeAlias, possible_relation_props:Optional[List[str]], strict:bool, clean_additional_properties:bool=False) -> AnyGet relation class.
class
llama-index-core.llama_index.core.indices.query.query_transform.base.BaseQueryTransformBase class for query transform.
method
llama-index-core.llama_index.core.indices.query.query_transform.base.BaseQueryTransform.run(query_bundle_or_str:QueryType, metadata:Optional[Dict]=None) -> QueryBundleRun query transform.
class
llama-index-core.llama_index.core.indices.query.query_transform.base.DecomposeQueryTransformDecompose query transform.
class
llama-index-core.llama_index.core.indices.query.query_transform.base.IdentityQueryTransformIdentity query transform.
class
llama-index-core.llama_index.core.indices.query.query_transform.base.ImageOutputQueryTransformImage output query transform.
class
llama-index-core.llama_index.core.indices.query.query_transform.base.StepDecomposeQueryTransformStep decompose query transform.
class
llama-index-core.llama_index.core.indices.struct_store.base.BaseStructStoreIndexBase Struct Store Index.
func
llama-index-core.llama_index.core.indices.struct_store.base.default_output_parser(output:str) -> Optional[Dict[str, Any]]Parse output of schema extraction.
class
llama-index-core.llama_index.core.indices.struct_store.container_builder.SQLContextContainerBuilderSQLContextContainerBuilder.
method
llama-index-core.llama_index.core.indices.struct_store.container_builder.SQLContextContainerBuilder.build_context_container(ignore_db_schema:bool=False) -> SQLContextContainerBuild index structure.
class
llama-index-core.llama_index.core.indices.struct_store.json_query.JSONQueryEngineGPT JSON Query Engine.
func
llama-index-core.llama_index.core.indices.struct_store.json_query.default_output_response_parser(llm_output:str) -> strAttempts to parse the JSON path prompt output.
class
llama-index-core.llama_index.core.indices.struct_store.sql.SQLStructStoreIndexSQL Struct Store Index.
class
llama-index-core.llama_index.core.indices.struct_store.sql_query.BaseSQLTableQueryEngineBase SQL Table query engine.
method
llama-index-core.llama_index.core.indices.struct_store.sql_query.BaseSQLTableQueryEngine.sql_retriever() -> NLSQLRetrieverGet SQL retriever.
class
llama-index-core.llama_index.core.indices.struct_store.sql_query.NLSQLTableQueryEngineNatural language SQL Table query engine.
method
llama-index-core.llama_index.core.indices.struct_store.sql_query.NLSQLTableQueryEngine.sql_retriever() -> NLSQLRetrieverGet SQL retriever.
class
llama-index-core.llama_index.core.indices.struct_store.sql_query.PGVectorSQLQueryEnginePGvector SQL query engine.
method
llama-index-core.llama_index.core.indices.struct_store.sql_query.PGVectorSQLQueryEngine.sql_retriever() -> NLSQLRetrieverGet SQL retriever.
class
llama-index-core.llama_index.core.indices.struct_store.sql_query.SQLTableRetrieverQueryEngineSQL Table retriever query engine.
method
llama-index-core.llama_index.core.indices.struct_store.sql_query.SQLTableRetrieverQueryEngine.sql_retriever() -> NLSQLRetrieverGet SQL retriever.
class
llama-index-core.llama_index.core.indices.struct_store.sql_retriever.BaseSQLParserBase SQL Parser.
method
llama-index-core.llama_index.core.indices.struct_store.sql_retriever.BaseSQLParser.parse_response_to_sql(response:str, query_bundle:QueryBundle) -> strParse response to SQL.
class
llama-index-core.llama_index.core.indices.struct_store.sql_retriever.DefaultSQLParserDefault SQL Parser.
method
llama-index-core.llama_index.core.indices.struct_store.sql_retriever.DefaultSQLParser.parse_response_to_sql(response:str, query_bundle:QueryBundle) -> strParse response to SQL.
class
llama-index-core.llama_index.core.indices.struct_store.sql_retriever.NLSQLRetrieverText-to-SQL Retriever.
method
llama-index-core.llama_index.core.indices.struct_store.sql_retriever.NLSQLRetriever.aretrieve_with_metadata(str_or_query_bundle:QueryType) -> Tuple[List[NodeWithScore], Dict]Async retrieve with metadata.
method
llama-index-core.llama_index.core.indices.struct_store.sql_retriever.NLSQLRetriever.retrieve_with_metadata(str_or_query_bundle:QueryType) -> Tuple[List[NodeWithScore], Dict]Retrieve with metadata.
class
llama-index-core.llama_index.core.indices.struct_store.sql_retriever.PGVectorSQLParserPGVector SQL Parser.
method
llama-index-core.llama_index.core.indices.struct_store.sql_retriever.PGVectorSQLParser.parse_response_to_sql(response:str, query_bundle:QueryBundle) -> strParse response to SQL.
class
llama-index-core.llama_index.core.indices.struct_store.sql_retriever.SQLParserModeSQL Parser Mode.
class
llama-index-core.llama_index.core.indices.struct_store.sql_retriever.SQLRetrieverSQL Retriever.
method
llama-index-core.llama_index.core.indices.struct_store.sql_retriever.SQLRetriever.retrieve_with_metadata(str_or_query_bundle:QueryType) -> Tuple[List[NodeWithScore], Dict]Retrieve with metadata.
class
llama-index-core.llama_index.core.indices.tree.all_leaf_retriever.TreeAllLeafRetrieverGPT all leaf retriever.
class
llama-index-core.llama_index.core.indices.tree.base.TreeIndexTree Index.
class
llama-index-core.llama_index.core.indices.tree.inserter.TreeIndexInserterLlamaIndex inserter.
method
llama-index-core.llama_index.core.indices.tree.inserter.TreeIndexInserter.insert(nodes:Sequence[BaseNode]) -> NoneInsert into index_graph.
class
llama-index-core.llama_index.core.indices.tree.select_leaf_retriever.TreeSelectLeafRetrieverTree select leaf retriever.
func
llama-index-core.llama_index.core.indices.tree.select_leaf_retriever.get_text_from_node(node:BaseNode, level:Optional[int]=None, verbose:bool=False) -> strGet text from node.
class
llama-index-core.llama_index.core.indices.tree.tree_root_retriever.TreeRootRetrieverTree root retriever.
func
llama-index-core.llama_index.core.indices.utils.default_format_node_batch_fn(summary_nodes:List[BaseNode]) -> strDefault format node batch function.
func
llama-index-core.llama_index.core.indices.utils.default_format_node_batch_for_chat_fn(summary_nodes:list[BaseNode]) -> list[ChatMessage]Default format node batch function.
func
llama-index-core.llama_index.core.indices.utils.get_sorted_node_list(node_dict:Dict[int, BaseNode]) -> List[BaseNode]Get sorted node list.
この情報について
掲載しているシグネチャは run-llama/llama_index の公開ソースコードを
Python の ast モジュールで静的解析し、引数名・デフォルト値・
型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。
詳しくは仕組みの解説をご覧ください。