Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

pupba
Copy link
Contributor

@pupba pupba commented May 6, 2025

Author Checklist

  • PR Title Format: I have confirmed that the PR title follows the correct format. (e.g., [N-2] 07-Text Splitter / 07-RecursiveCharacterTextSplitter)

  • Committed Files: I have ensured that no unnecessary files (e.g., .bin, .gitignore, poetry.lock, pyproject.toml) are included. These files are not allowed.

  • (Optional) Related Issue: If this PR is linked to an issue, I have referenced the issue number in the PR message. (e.g., Fixes Update 01-PromptTemplate.ipynb #123)

  • ❌ Do not include unnecessary files (e.g., .bin, .gitignore, poetry.lock, pyproject.toml) or other people's code. If included, close the PR and create a new PR.

Review Template (Intial PR)

🖥️ OS: Win/Mac/Linux   
✅ Checklist      
 - [ ] **Template**: Tutorials follows the required template. 
 - [ ] **Table of Contents(TOC) Links**: All Table of Contents links work. (Yes/No)
 - [ ] **Image**: Image filenames follow guidelines.
 - [ ] **Imports**: All import statements use the latest versions. Ensure "langchain-teddynote" is not used. 
 - [ ] **Code Execution**: Code runs without errors.
 - Comments: {Write freely, 한국어 기술 가능}     

If no one reviews your PR within a few days, please @-mention one of teddylee777, musangk, BAEM1N

Update

  • Master Template에 맞춰서 기존 노트북 수정
  • 코드 수정(경량화)

pupba added 3 commits May 6, 2025 17:43
- New Qdrant Tutorial
- Legacy Notbook and Python Script Move to `/utils/qdrant/legacy/`
@sohyunwriter
Copy link
Contributor

아래 코드 부분에서 오류 나는데 확인 부탁 드립니다

(코드)

# Get DB Client Object

client = get_db_client()

(오류)

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[8], [line 3](vscode-notebook-cell:?execution_count=8&line=3)
      [1](vscode-notebook-cell:?execution_count=8&line=1) # Get DB Client Object
----> [3](vscode-notebook-cell:?execution_count=8&line=3) client = get_db_client()

Cell In[7], [line 30](vscode-notebook-cell:?execution_count=7&line=30)
     [27](vscode-notebook-cell:?execution_count=7&line=27) host = os.environ.get("QDRANT_URL", None)
     [28](vscode-notebook-cell:?execution_count=7&line=28) api_key = os.environ.get("QDRANT_API_KEY", None)
---> [30](vscode-notebook-cell:?execution_count=7&line=30) client = QdrantClient(
     [31](vscode-notebook-cell:?execution_count=7&line=31)     url=host, api_key=api_key, check_compatibility=False, timeout=30
     [32](vscode-notebook-cell:?execution_count=7&line=32) )
     [34](vscode-notebook-cell:?execution_count=7&line=34) return client

File ~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/qdrant_client.py:134, in QdrantClient.__init__(self, location, url, port, grpc_port, prefer_grpc, https, api_key, prefix, timeout, host, path, force_disable_check_same_thread, grpc_options, auth_token_provider, **kwargs)
    [132](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/qdrant_client.py:132) if location is not None and url is None:
    [133](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/qdrant_client.py:133)     url = location
--> [134](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/qdrant_client.py:134) self._client = QdrantRemote(
    [135](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/qdrant_client.py:135)     url=url,
    [136](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/qdrant_client.py:136)     port=port,
    [137](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/qdrant_client.py:137)     grpc_port=grpc_port,
    [138](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/qdrant_client.py:138)     prefer_grpc=prefer_grpc,
    [139](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/qdrant_client.py:139)     https=https,
    [140](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/qdrant_client.py:140)     api_key=api_key,
    [141](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/qdrant_client.py:141)     prefix=prefix,
    [142](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/qdrant_client.py:142)     timeout=timeout,
    [143](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/qdrant_client.py:143)     host=host,
    [144](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/qdrant_client.py:144)     grpc_options=grpc_options,
    [145](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/qdrant_client.py:145)     auth_token_provider=auth_token_provider,
    [146](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/qdrant_client.py:146)     **kwargs,
    [147](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/qdrant_client.py:147) )

File ~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/qdrant_remote.py:168, in QdrantRemote.__init__(self, url, port, grpc_port, prefer_grpc, https, api_key, prefix, timeout, host, grpc_options, auth_token_provider, **kwargs)
    [165](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/qdrant_remote.py:165)     bearer_auth = BearerAuth(self._auth_token_provider)
    [166](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/qdrant_remote.py:166)     self._rest_args["auth"] = bearer_auth
--> [168](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/qdrant_remote.py:168) self.openapi_client: SyncApis[ApiClient] = SyncApis(
    [169](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/qdrant_remote.py:169)     host=self.rest_uri,
    [170](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/qdrant_remote.py:170)     **self._rest_args,
    [171](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/qdrant_remote.py:171) )
    [173](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/qdrant_remote.py:173) self._grpc_channel = None
    [174](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/qdrant_remote.py:174) self._grpc_points_client: Optional[grpc.PointsStub] = None

File ~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/http/api_client.py:36, in SyncApis.__init__(self, host, **kwargs)
     [35](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/http/api_client.py:35) def __init__(self, host: str = None, **kwargs: Any):
---> [36](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/http/api_client.py:36)     self.client = ApiClient(host, **kwargs)
     [38](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/http/api_client.py:38)     self.beta_api = SyncBetaApi(self.client)
     [39](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/http/api_client.py:39)     self.cluster_api = SyncClusterApi(self.client)

File ~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/http/api_client.py:60, in ApiClient.__init__(self, host, **kwargs)
     [58](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/http/api_client.py:58) self.host = host
     [59](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/http/api_client.py:59) self.middleware: MiddlewareT = BaseMiddleware()
---> [60](https://file+.vscode-resource.vscode-cdn.net/Users/sohyun/project/LangChain-OpenTutorial/09-VectorStore/~/Library/Caches/pypoetry/virtualenvs/langchain-opentutorial-FtaFqYLT-py3.11/lib/python3.11/site-packages/qdrant_client/http/api_client.py:60) self._client = Client(**kwargs)

TypeError: Client.__init__() got an unexpected keyword argument 'check_compatibility'

- QdrantClient 객체 생성 오류 해결 : 버전 차이로 인해 `check_compatibility` 사용 X
Copy link
Contributor

@sohyunwriter sohyunwriter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네네 수정 확인했습니다. 코드 실행 잘 됩니다!

@sohyunwriter sohyunwriter merged commit 4396860 into LangChain-OpenTutorial:main May 8, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants