mirror of
https://github.com/enricoros/big-AGI.git
synced 2026-05-11 14:10:15 -07:00
d6215d021e
Note: this feature uses @dqbd/tiktoken which in turns uses WebAssembly to perform re-tokenization for every single character typed (there's no reusing/smart caching of blocks). This may be super heavy while being super useful - we'll see what people say. Note the usage of Async webAssembly is enabled in the 'webpack' config within next.config.js.
23 lines
600 B
JavaScript
23 lines
600 B
JavaScript
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
reactStrictMode: true,
|
|
env: {
|
|
// defaults to TRUE, unless API Keys are set at build time; this flag is used by the UI
|
|
REQUIRE_USER_API_KEYS: !process.env.OPENAI_API_KEY,
|
|
},
|
|
webpack(config, { isServer, dev }) {
|
|
// @mui/joy: anything material gets redirected to Joy
|
|
config.resolve.alias['@mui/material'] = '@mui/joy';
|
|
|
|
// @dqbd/tiktoken: enable asynchronous WebAssembly
|
|
config.experiments = {
|
|
asyncWebAssembly: true,
|
|
layers: true,
|
|
};
|
|
|
|
return config;
|
|
},
|
|
};
|
|
|
|
module.exports = nextConfig;
|