skip to Main Content

AttributeError: 'str' object has no attribute 'get_token' in Python when using Azure Cognitive Search Vector Search

I am trying to do a Vector Search with Azure Cognitive Search in Python. This is my code: query = "What are the advantages of an open-source ai model?" search_client = SearchClient(AZURE_COGNITIVE_SEARCH_SERVICE_ENDPOINT, AZURE_COGNITIVE_SEARCH_INDEX_NAME, credential=AZURE_COGNITIVE_SEARCH_API_KEY) vector_query = VectorizableTextQuery(text=query, k=3, fields="content_vector") results…

VIEW QUESTION

Azure – Terraform conditional attribute setting

resource "azurerm_public_ip" "instance_public_ip" { count = var.assign_public_ip == "true" ? 1 : 0 name = "${var.name}-public-ip" location = var.location resource_group_name = var.resource_group_name allocation_method = "Dynamic" } resource "azurerm_network_interface" "main" { name = "${var.name}-nic" location = var.location resource_group_name = var.resource_group_name ip_configuration…

VIEW QUESTION

Azure Cost Management API is not returning the Blob location

I have a PowerShell script that calls the Microsoft Azure API for cost management. I first call: https://management.azure.com/providers/Microsoft.Billing/enrollmentAccounts/*****5/providers/Microsoft.CostManagement/generateCostDetailsReport?api-version=2023-08-01" This returns a 202 as expected: StatusCode : 202 StatusDescription : Accepted Content : {} RawContent : HTTP/1.1 202 Accepted Pragma: no-cache…

VIEW QUESTION
Back To Top
Search