GithubHelp home page GithubHelp logo

Comments (3)

64bit avatar 64bit commented on June 5, 2024

It sounds like it would have been easier if you sent PR to this repo instead.

Contributions are welcome!

from async-openai.

ifsheldon avatar ifsheldon commented on June 5, 2024

I was about to, but I didn't want to make a PR that adds a feature without proper discussion, which is rude from my view.

There are a couple of issues:

  • Should we add Serialize as well? It just a convenient derive, but should we?
  • As far as I know, OpenAI requires at least an API key, so the other fields in OpenAIConfig are optional. To make them optional in deserialization, we need to change them to Option<String>, so this change leads to broader impacts I guess

I will make a PR, though.

from async-openai.

64bit avatar 64bit commented on June 5, 2024

Thank you for elaborating.

I think there is no downside to adding Serialize as well - at least you'll have the machinery to read from and write to config files without introducing any breaking change like making fields Optional - just that all the fields can be stored in config file to later Deserilaize.

If the semantics of required-fields and optional-fields are required in config file then you're welcome to send follow up PR - we'll just have to do a version bump for breaking change.

from async-openai.

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.