You can use the `createChatAdapter` function to create a LangServe adapter as shown below:

```jsx
const langServeAdapter = createChatAdapter()
    .withUrl('https://pynlux.api.nlux.ai/pirate-speak');
```

The `createChatAdapter` function takes will return an adapter builder that you can use to configure by chaining methods.
The `withUrl(<URL>)` method is used to specify the URL of the LangServe Runnable that you want to use.
You can read more about the exact format of the URL in [the reference documentation](/reference/adapters/langchain-langserve#runnable-url).

In this example, we are connecting a demo API provided by _NLUX_ that runs a LangServe Runnable that translates
text to pirate speak. It's based on one the examples from the LangServe documentation.
