Git Product home page Git Product logo

Comments (4)

xiangyan99 avatar xiangyan99 commented on June 13, 2024

Thanks for reaching out. Please try code like this:

from azure.search.documents.indexes.models import (
    HnswAlgorithmConfiguration, HnswParameters
)

Hnsw_m_parameter = 4
Hnsw_ef_construction = 400
Hnsw_ef_search = 500
vector_search_metric = "cosine"
vector_search_dim = 1536
example_config = HnswAlgorithmConfiguration(
                name="vector-config-discover",
                kind="hnsw",
                parameters=HnswParameters(
                    m=1,
                    ef_construction=Hnsw_ef_construction,
                    ef_search=Hnsw_ef_search,
                    metric=vector_search_metric,
                )
            )
example_config.as_dict()

from azure-sdk-for-python.

github-actions avatar github-actions commented on June 13, 2024

Hi @VincentMcLoughlin. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.

from azure-sdk-for-python.

VincentMcLoughlin avatar VincentMcLoughlin commented on June 13, 2024

Hi @xiangyan99 that does work! Only I had to change the import from HnswAlgorithmConfiguration to HnswVectorSearchAlgorithmConfiguration but I think that might have been a typo. Thank you for sending that. Is there any way we could change the HnswVectorSearchAlgorithmConfiguration object to reflect the fact that you won't have full functionality if you pass in the dictionary? It seems odd to allow for the passing of a dictionary when that causes some of the class methods to break. A more descriptive error message would also be helpful.

from azure-sdk-for-python.

github-actions avatar github-actions commented on June 13, 2024

Hi @VincentMcLoughlin, since you haven’t asked that we /unresolve the issue, we’ll close this out. If you believe further discussion is needed, please add a comment /unresolve to reopen the issue.

from azure-sdk-for-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.