Giter Club home page Giter Club logo

Comments (16)

dpayne-voss avatar dpayne-voss commented on July 19, 2024 2

Hi @sonphnt, I am experiencing the same problem (issue 314).

I replaced AZURE_CHAT_HOST with the domain of my App Service (not I'm using a custom domain), and then ultimately get an Unauthorized error when the tool is trying to make the API request in the ExecuteFunction function.

For now I've modified the ExecuteFunction to check for the api/document endpoint and in that case call the similarity search function directly.

from azurechat.

mkandukuri4 avatar mkandukuri4 commented on July 19, 2024 1

Hi, I'm trying to set up this AI search on a small set of documents, what values should be passed for vectors in headers in step: 6-chat-over-file.md. I have passed (content, title) but still failing with the below error in the tool output

status: ERROR
message: RestError: The field 'content' in the vector field list is not a vector field.
Parameter name: vector.fields

from azurechat.

thivy avatar thivy commented on July 19, 2024

@sonphnt as @dpayne-voss mentioned, please replace the AZURE_CHAT_HOST with the name of the Azure App service name.

Note: this is not the Azure Search name.

from azurechat.

dpayne-voss avatar dpayne-voss commented on July 19, 2024

Thanks @thivy , but even after using my App Service name (not I'm using a custom domain), I get an Unauthorized error when the tool tries to make the /api/document request.

from azurechat.

thivy avatar thivy commented on July 19, 2024

Thanks @thivy , but even after using my App Service name (not I'm using a custom domain), I get an Unauthorized error when the tool tries to make the /api/document request.

Can you ensure that the endpoint is similar to below this should include azurewebsites.net
https://your_website_name.azurewebsites.net/api/document

from azurechat.

sonphnt avatar sonphnt commented on July 19, 2024

I run localhost and set that API endpoint to http://localhost:3000/api/document. it works for me but the response is very slow on GPT4-1106 model for each question.

  • 10 seconds showing "Show aisearch function" with a spinner.
  • 30-45 seconds showing "Show tool output" with a spinner before the result can show up on the UI.

Switching to GPT 3.5 1106 seems to be much faster with about 5 seconds.
I will try to run this on Azure App Service later.

from azurechat.

derkoe avatar derkoe commented on July 19, 2024

Hi, I'm trying to set up this AI search on a small set of documents, what values should be passed for vectors in headers in step: 6-chat-over-file.md. I have passed (content, title) but still failing with the below error in the tool output

status: ERROR message: RestError: The field 'content' in the vector field list is not a vector field. Parameter name: vector.fields

Seems like this cannot be working because it uses the same vectors for search and then for filtering the result fields.

from azurechat.

mkandukuri4 avatar mkandukuri4 commented on July 19, 2024

@derkoe Any Idea on how can we get it to work?
@thivy any thoughts?

from azurechat.

derkoe avatar derkoe commented on July 19, 2024

@mkandukuri4 removing these lines

// exclude the all the fields that are not in the fields array
const document = item.document as any;
const newDocument: any = {};
// iterate over the object entries in document
// and only include the fields that are in the fields array
for (const key in document) {
const hasKey = vectors.includes(key);
if (!hasKey) {
newDocument[key] = document[key];
}
}

and then using document instead of newDocument on this line

document: newDocument, // Use the newDocument object instead of the original document

will fix it

from azurechat.

mkandukuri4 avatar mkandukuri4 commented on July 19, 2024

Hi @derkoe , I have tried the suggested solution but still failing with the below error. see the code for changes made in the azure-ai-search.ts
can you check if I'm missing something
// // exclude the all the fields that are not in the fields array
// const document = item.document as any;
// const newDocument: any = {};

  // // iterate over the object entries in document
  // // and only include the fields that are in the fields array

  // for (const key in document) {
  //   const hasKey = vectors.includes(key);
  //   if (!hasKey) {
  //     newDocument[key] = document[key];
  //   }
  // }

  results.push({
    score: result.score,
    document: document, // Use the newDocument object instead of the original document
  });
}

Error:
message: RestError: The field 'content' in the vector field list is not a vector field.
Parameter name: vector.fields

from azurechat.

sonphnt avatar sonphnt commented on July 19, 2024

@mkandukuri4 Are you using Vector search? it seems like the field "content" in Azure AI Search is not a Vector type

from azurechat.

mkandukuri4 avatar mkandukuri4 commented on July 19, 2024

Hi @sonphnt

Thank you, I was able to get this working after enabling vector search in Azure OpenAI studio when creating an index.

image

from azurechat.

samsutherland avatar samsutherland commented on July 19, 2024

@mkandukuri4 - where is that checkbox exactly?

from azurechat.

rbandi71 avatar rbandi71 commented on July 19, 2024

I am getting https://webapphost/api/document Unauthorized. Have you ever been able to address this issue? It works locally when used: http://localhost:3000/api/document

from azurechat.

jnxjent avatar jnxjent commented on July 19, 2024

I can not upload the file in local clone (local host:3000) even though I can do in remote. There is error saying
index error

from azurechat.

jnxjent avatar jnxjent commented on July 19, 2024

I have another quesiton. I wish to search contents of the file uploaded before. I can search the file's uploaded in the chat but cannot search the file uploaded in different chat. Probably, how to index is the key??

from azurechat.

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.