Code Monkey home page Code Monkey logo

Comments (3)

elliotzh avatar elliotzh commented on August 20, 2024 1

Hi @LittleColin thank you for reaching out to us. Let me confirm - your request is:

for now, we will extract secrets (api_key in most cases) and replace them with environment variables only; however, you want us to provide a parameter to customize the fields to be replaced with environment variables.

We will discuss this feature ask first. On the other hand, we haven't done that support before because the configuration can be complicated to specify fields to be replaced, especially given different type of connections may have different fields.

Besides your workaround to add a post-process step:

  1. we have a feature that we will respect environment variable of a specific name with a higher priority, then the value in connection yaml
    1. for example, if the connection name is my-connection, you can set an environment variable named MY_CONNECTION_API_BASE and we will respect it on serving.
    2. sorry we haven't mentioned this in current doc, but we have a test for this: link
  2. you can also use a CustomConnection and mark all fields you want to replace as secrets - we're hiding all secrets instead of some specific fields.

from promptflow.

LittleColin avatar LittleColin commented on August 20, 2024 1

Thanks for the response, yes the override appears to work and addresses the feature request. However, the logging could be improved in this area as the myconnection.yaml content is displayed including the api base URL but with no indication that it has been overridden by an environment var. Also, if there's a connection issue, the error does not show the api base that was being connected to (I cannot see anywhere in the logs that the actual api base is emitted).

Suggest changing the cat of myconnection.yaml to indicate value has been overridden by an env var as would be good to know even on a successful connection.

from promptflow.

elliotzh avatar elliotzh commented on August 20, 2024

Thank you for your suggestion. We will use an internal task to track the log improvement and close this issue first.

from promptflow.

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.