OpenCore中file parser node的基类接口介绍

本文介绍了多个用于控制多媒体播放的接口,包括播放控制、数据源初始化、Track信息管理等。这些接口负责处理播放命令、数据初始化、Track选择等功能。

 

1、OsclTimerObject:

 

 

2、PVMFNodeInterface:

控制播放的接口,负责接收一些控制命令,然后放到队列中等待执行。

 

 

3、PVMFDataSourceInitializationExtensionInterface:

控制数据初始化的接口。传入文件名。

 

 

4、PVMFTrackSelectionExtensionInterface:

控制TrackInfo的接口。 保存一Track的一些信息。

 

 

5、PvmfDataSourcePlaybackControlInterface:

控制跳转的接口.

 

 

6、PVMFMetadataExtensionInterface:

获得一些关键字,及值。

 

 

代码为import chromadb from llama_index.core import Document,SimpleDirectoryReader from llama_index.core.node_parser import SentenceSplitter from llama_index.core.ingestion import IngestionPipeline from llama_index.core.extractors import TitleExtractor from llama_index.llms.ollama import Ollama from llama_index.embeddings.ollama import OllamaEmbedding from llama_index.vector_stores.chroma import ChromaVectorStore from llama_index.vector_stores.chroma.base import VectorStoreQueryResult from llama_index.core.vector_stores.types import VectorStoreQuery #构造向量存储对象用于存储最后输出的Node对象 llm=Ollama(model="qwen3:0.6b") embedded_model=OllamaEmbedding(model_name="qwen3:0.6b",embed_batch_size=50) chroma = chromadb.PersistentClient(path="./chroma_db") collection = chroma.get_or_create_collection(name="pipeline") vector_store=ChromaVectorStore(chroma_collection=collection) docs=SimpleDirectoryReader(input_files=["..\\5.3\\test.txt"]).load_data() pipline=IngestionPipeline( transformations=[ SentenceSplitter(chunk_size=500,chunk_overlap=0), TitleExtractor(llm=llm,show_progess=False), embedded_model ], vector_store=vector_store ) nodes=pipline.run(documents=docs) query=VectorStoreQuery( query_str='文心一眼是什么?', similarity_top_k=3, mode="default" ) #用输入问题做语义检索 results=vector_store.query(query) print(results.nodes) 报错Traceback (most recent call last): File "D:\pycharm\pythonProject2\rag\第五章\5.4\5.4存储到向量库.py", line 6, in <module> from llama_index.llms.ollama import Ollama File "D:\pycharm\pythonProject2\venv\lib\site-packages\llama_index\llms\ollama\__init__.py", line 1, in <module> from llama_index.llms.ollama.base import Ollama File "D:\pycharm\pythonProject2\venv\lib\site-packages\llama_index\llms\ollama\base.py", line 42, in <module> from llama_index.core.program.utils import process_streaming_objects, FlexibleModel ImportError: cannot import name 'process_streaming_objects' from 'llama_index.core.program.utils' (D:\pycharm\pythonProject2\venv\lib\site-packages\llama_index\core\program\utils.py)
06-11
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值