Skip to content

Leverage php-http/discovery to let users choose their http client implementation #145

@welcoMattic

Description

@welcoMattic

Note

Reported from php-llm/llm-chain#318

As it's done in OpenAI PHP Client, it could improve the interoperability to leverage https://github.com/php-http/discovery (and psr/http-client-implementation + psr/http-factory-implementation) to reuse HttpClient installed in users' projects or suggest them one that implements PSR-18 interface.
OpenAI PHP Client choose to not be hard dependent on any other Http Client implementation to let use an already installed Http Client or suggest one, comptible with PSR-18.
I'm opening this issue to replicate this behavior to php-llm/llm-chain, instead of "forcing" users to use symfony/http-client.
First step first is to identify where live hardcoded dependencies to Symfony HttpClient.

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFCRFC = Request For Comments (proposals about features that you want to be discussed)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions