I add following lines to route.ts:
import { createAnthropic } from '@ai-sdk/anthropic'
const anthropic = createAnthropic({
baseURL: 'https://xxxxxx.xx/v1', //My custom anthropic baseURL
});
The application can run and the LLM response can be seen. But it won't give me back the result of running the code and can't preview. The log shows:
userID xxxxxx
template code-interpreter-multilang
The data stream is hanging. Did you forget to close it with data.close()?
create or connect code interpreter sandbox xxxxxxx
POST /api/chat 200 in 7291ms
I honestly do not know if using default anthropic api settings will be fine because I don't have a anthropic api account.
Or maybe it is something with the sandbox.
solved. my E2B api key is wrong. The message "The data stream is hanging. Did you forget to close it with data.close()?" is still there but seems can be ignored.
I add following lines to route.ts: import { createAnthropic } from '@ai-sdk/anthropic' const anthropic = createAnthropic({ baseURL: 'https://xxxxxx.xx/v1', //My custom anthropic baseURL });
The application can run and the LLM response can be seen. But it won't give me back the result of running the code and can't preview. The log shows:
userID xxxxxx template code-interpreter-multilang The data stream is hanging. Did you forget to close it with
data.close()
? create or connect code interpreter sandbox xxxxxxx POST /api/chat 200 in 7291msI honestly do not know if using default anthropic api settings will be fine because I don't have a anthropic api account. Or maybe it is something with the sandbox.