Skip to content

Releases: ianrothmann/langserve-php-client

Added SSL Verification Option

Choose a tag to compare

@ianrothmann ianrothmann released this 06 Oct 06:22

You can now pass verifySsl in the constructor. It is true by default.

Added an idle timeout

Choose a tag to compare

@ianrothmann ianrothmann released this 29 Aug 07:03

Default is 10 minutes

Bug Fix with mixed for older php versions

Choose a tag to compare

@ianrothmann ianrothmann released this 21 Aug 05:07
1.0.1

Issue with mixed on php 7.4

Initial Release

Choose a tag to compare

@ianrothmann ianrothmann released this 19 Aug 13:27

This release is now backwards compatible >= php 7.4 if required in legacy projects

Added a X-Trace-Id header

Choose a tag to compare

@ianrothmann ianrothmann released this 16 Jun 15:50

For tracking calls to remote runnables. This needs to be implemented in LangServe as follows:

import contextvars
trace_id_var = contextvars.ContextVar("trace_id", default=None)

async def set_trace_id(x_trace_id: Optional[str] = Header(None)):
    if x_trace_id:
        trace_id_var.set(x_trace_id)

dependencies.append(Depends(set_trace_id))

app = FastAPI(
    title="AINinja Server",
    version="1.0",
    dependencies=dependencies,
)

def config_modifier(config: RunnableConfig, ctx):
    if "tags" not in config:
        config["tags"] = []
    if trace_id_var.get():
        config["tags"].append(trace_id_var.get())
    return config

add_routes(
        app,
        runnable,
        path=path,
        per_req_config_modifier=config_modifier,
    )


This then creates a tag in LangSmith for the trace ID

Bug fix in Streamed Response

Choose a tag to compare

@ianrothmann ianrothmann released this 16 Jun 10:57

Tested with LangChain 0.2, when using llm.with_structured_output(PydanticModel), it sends json back in events. It now only uses the final json sent.

Pooled async execution supported

Choose a tag to compare

@ianrothmann ianrothmann released this 14 Jun 11:14
0.0.5

Async calls - RemoteRunnablePool

Release with minor updates (pre-production)

Choose a tag to compare

@ianrothmann ianrothmann released this 09 Jun 03:05
0.0.4

Better handling of content keys in streaming responses

More flexible options with headers and authentication

Choose a tag to compare

@ianrothmann ianrothmann released this 05 May 12:19

You have some different options for adding headers and authentication:

$runnable->authenticateWithBearerToken('your-token'); //Add a Bearer token header with the token
$runnable->authenticateWithXToken('your-token'); //Add the X-Token header, if you implemented it according to the LangServe
$runnable->addHeader('Key', 'Value'); //Add any other header

Initial version with some bug fixes

Choose a tag to compare

@ianrothmann ianrothmann released this 02 May 08:20

Batch call: Ensured a valid set of RemoteRunnableResponse as if it was called with invoke