langchain4j-examples icon indicating copy to clipboard operation
langchain4j-examples copied to clipboard

`demo` API key not working with Streaming example

Open lordofthejars opened this issue 2 years ago • 1 comments

I am running the examples from this repo, when using the demo API key with not streaming examples, it works perfectly, when I executed the streaming examples I got:

2023-10-10 16:05:31,521 ERROR [org.acm.StreamingResource$1] (OkHttp https://api.openai.com/...) {
    "error": {
        "message": "Incorrect API key provided: demo. You can find your API key at https://platform.openai.com/account/api-keys.",
        "type": "invalid_request_error",
        "param": null,
        "code": "invalid_api_key"
    }
}

So maybe this key is only valid when not used in streaming mode?

lordofthejars avatar Oct 10 '23 14:10 lordofthejars