dspy.Embedder

dspy.Embedder

이 페이지는 DSPy의 임베딩 모델 인터페이스인 Embedder를 다뤄요. 텍스트나 문서를 벡터로 변환해 주는 모델을 DSPy에 연결하는 데 쓰여요. 검색을 위한 벡터 인덱스나 의미론적 비교가 필요할 때 활용할 수 있어요.

출처: 문서

본문

!!! note "Requires numpy" dspy.Embedder requires numpy. Install it with pip install dspy[numpy].

dspy.Embedder는 numpy가 필요해요. pip install dspy[numpy]로 설치할 수 있어요.

Embedder는 임베딩 생성의 공통 인터페이스예요. __call__과 비동기 acall로 입력을 벡터 표현으로 바꿔요. 아래는 이 클래스가 노출하는 멤버 목록이에요.

::: dspy.Embedder
    handler: python
    options:
        members:
            - __call__
            - acall
        show_source: true
        show_root_heading: true
        heading_level: 2
        docstring_style: google
        show_root_full_path: true
        show_object_full_path: false
        separate_signature: false
        inherited_members: true

더 알아보기 (Learn more)