Fix/qdrant support (#1253)
* Disable check same thread by default to enable disk-based Qdrant local client to work
This commit is contained in:
		
							parent
							
								
									23fa530c31
								
							
						
					
					
						commit
						2a417d2f61
					
				|  | @ -259,7 +259,7 @@ poetry install --extras qdrant | ||||||
| 
 | 
 | ||||||
| By default Qdrant tries to connect to an instance at `http://localhost:3000`. | By default Qdrant tries to connect to an instance at `http://localhost:3000`. | ||||||
| 
 | 
 | ||||||
| Qdrant settings can be configured by setting values to the `qdrant` propery in the `settings.yaml` file. | Qdrant settings can be configured by setting values to the `qdrant` property in the `settings.yaml` file. | ||||||
| 
 | 
 | ||||||
| The available configuration options are: | The available configuration options are: | ||||||
| | Field        | Description | | | Field        | Description | | ||||||
|  | @ -275,6 +275,7 @@ The available configuration options are: | ||||||
| | timeout      | Timeout for REST and gRPC API requests.<br>Default: 5.0 seconds for REST and unlimited for gRPC | | | timeout      | Timeout for REST and gRPC API requests.<br>Default: 5.0 seconds for REST and unlimited for gRPC | | ||||||
| | host         | Host name of Qdrant service. If url and host are not set, defaults to 'localhost'.| | | host         | Host name of Qdrant service. If url and host are not set, defaults to 'localhost'.| | ||||||
| | path         | Persistence path for QdrantLocal. Eg. `local_data/private_gpt/qdrant`| | | path         | Persistence path for QdrantLocal. Eg. `local_data/private_gpt/qdrant`| | ||||||
|  | | force_disable_check_same_thread         | Force disable check_same_thread for QdrantLocal sqlite connection.| | ||||||
| 
 | 
 | ||||||
| #### Known issues and Troubleshooting | #### Known issues and Troubleshooting | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -1,4 +1,4 @@ | ||||||
| # This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. | # This file is automatically @generated by Poetry 1.7.0 and should not be changed by hand. | ||||||
| 
 | 
 | ||||||
| [[package]] | [[package]] | ||||||
| name = "aiofiles" | name = "aiofiles" | ||||||
|  | @ -3625,13 +3625,13 @@ files = [ | ||||||
| 
 | 
 | ||||||
| [[package]] | [[package]] | ||||||
| name = "qdrant-client" | name = "qdrant-client" | ||||||
| version = "1.6.4" | version = "1.6.9" | ||||||
| description = "Client library for the Qdrant vector search engine" | description = "Client library for the Qdrant vector search engine" | ||||||
| optional = true | optional = true | ||||||
| python-versions = ">=3.8,<3.13" | python-versions = ">=3.8,<3.13" | ||||||
| files = [ | files = [ | ||||||
|     {file = "qdrant_client-1.6.4-py3-none-any.whl", hash = "sha256:db4696978d6a62d78ff60f70b912383f1e467bda3053f732b01ddb5f93281b10"}, |     {file = "qdrant_client-1.6.9-py3-none-any.whl", hash = "sha256:6546f96ceec389375e323586f0948a04183bd494c5c48d0f3daa267b358ad008"}, | ||||||
|     {file = "qdrant_client-1.6.4.tar.gz", hash = "sha256:bbd65f383b6a55a9ccf4e301250fa925179340dd90cfde9b93ce4230fd68867b"}, |     {file = "qdrant_client-1.6.9.tar.gz", hash = "sha256:81affd66f50aa66d60835fe2f55efe727358bf9db24eada35ff1b32794a82159"}, | ||||||
| ] | ] | ||||||
| 
 | 
 | ||||||
| [package.dependencies] | [package.dependencies] | ||||||
|  | @ -5497,4 +5497,4 @@ qdrant = ["qdrant-client"] | ||||||
| [metadata] | [metadata] | ||||||
| lock-version = "2.0" | lock-version = "2.0" | ||||||
| python-versions = ">=3.11,<3.12" | python-versions = ">=3.11,<3.12" | ||||||
| content-hash = "a72d664bdd24534d353deb2ad98cdebb5caa1647315405260c9c9f6e64d52f5a" | content-hash = "7c15c3225a7349946d3e238ac5c24ef39baa126d536759ca4a960ff73de03509" | ||||||
|  |  | ||||||
|  | @ -153,6 +153,13 @@ class QdrantSettings(BaseModel): | ||||||
|         description="Host name of Qdrant service. If url and host are None, set to 'localhost'.", |         description="Host name of Qdrant service. If url and host are None, set to 'localhost'.", | ||||||
|     ) |     ) | ||||||
|     path: str | None = Field(None, description="Persistence path for QdrantLocal.") |     path: str | None = Field(None, description="Persistence path for QdrantLocal.") | ||||||
|  |     force_disable_check_same_thread: bool | None = Field( | ||||||
|  |         True, | ||||||
|  |         description=( | ||||||
|  |             "For QdrantLocal, force disable check_same_thread. Default: `True`" | ||||||
|  |             "Only use this if you can guarantee that you can resolve the thread safety outside QdrantClient." | ||||||
|  |         ), | ||||||
|  |     ) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class Settings(BaseModel): | class Settings(BaseModel): | ||||||
|  |  | ||||||
|  | @ -15,7 +15,7 @@ pypdf = "^3.16.2" | ||||||
| llama-index = "0.8.67" | llama-index = "0.8.67" | ||||||
| chromadb = "^0.4.13" | chromadb = "^0.4.13" | ||||||
| watchdog = "^3.0.0" | watchdog = "^3.0.0" | ||||||
| qdrant-client = {version = "^1.6.4", optional = true} | qdrant-client = {version = "^1.6.9", optional = true} | ||||||
| 
 | 
 | ||||||
| [tool.poetry.group.dev.dependencies] | [tool.poetry.group.dev.dependencies] | ||||||
| black = "^22" | black = "^22" | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue