Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to set ai model explicitly before executing preprocess.sh script in local #173

Closed
guitarsheng opened this issue Sep 19, 2023 · 2 comments
Assignees

Comments

@guitarsheng
Copy link

I found some issue , in the step (Optional) Preprocess the data into the vector store in acme-fitness-store/apps/acme-assist/README.md at Azure · Azure-Samples/acme-fitness-store (github.com).

Before running preprocess.sh script locally, the application.yaml file should to be changed as below:

spring:
  ai:
    azure:
      openai:
        apiKey: <api key>
        endpoint: <ai endpoint>
        model: text-embedding-ada-002    //the model should be set to text-embedding-xxx explicitly.
...
@markpollack
Copy link

The current file is

spring:
  ai:
    azure:
      openai:
        model: gpt-35-turbo-16k
management:
  endpoints:
    web:
      exposure:
        include: info,health

The model refers to the AI model and needs to be gpt-35-turbo-16k, not text-embedding-ada-002. There is a property embeddingModel but the default value in Spring AI is text-embedding-ada-002 so there is no need to set it.

I would recommend that we do not tell the user's to update application.yaml

        apiKey: <api key>
        endpoint: <ai endpoint>

but instead tell them to set the environment variables.

export SPRING_AI_AZURE_OPENAI_API_KEY=<api key>
export SPRING_AI_AZURE_OPENAI_ENDPOINT=<end point>

It can go either way, but setting env vars is already something they need to do, so it keeps the flow of the experience the same for the user.

@guitarsheng
Copy link
Author

Yes, I have made change in this PR

#183

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants