mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
95bcbd8825
* move messages to context * update prettier * remove const generics from .prettierignore * exclude build files in VSCode * add api key to props * log chat requests to the cloud * edit content violation message * add cloud prefix * use the current cloud url * inline guardrails definitions * update domain * add input guardrail * Pre release mme/cloud * Pre release mme/cloud - exit pre mode * rename API key to publicApiKey * Uniform handling of api key header * Pre release mme/cloud * Pre release mme/cloud - exit pre mode * streamline cloud config and add cloud client * Pre release mme/cloud * Pre release mme/cloud - exit pre mode * get headers via case insensitive method * Pre release mme/cloud * Pre release mme/cloud - exit pre mode * update API key * add reason to guardrail * Pre release mme/cloud * Pre release mme/cloud - exit pre mode * update api key * rename chat endpoint to engine/openai * rename cloud chat endpoint * update API key * add api version * update endpoint url * update API key * update api keys * make valid topics optional * update API key * add missing import * exclude Next.js build folder * rename: CloudClient —> CopilotCloud, DefaultCopilotCloudClient —> RemoteCopilotCloud * CopilotBackend —> CopilotRuntime * url -> runtimeUrl * update docs: CopilotRuntime * updae docs * exit pre * Pre release mme/cloud * Pre release mme/cloud - exit pre mode * update comment * Pre release mme/cloud * Pre release mme/cloud - exit pre mode * update comments * Pre release mme/cloud * Pre release mme/cloud - exit pre mode * remove hardcoded guardrails reply * Fix forwardedProps could be undefined * send api key when using text area completion * fix getting header in node http * update docs * update to the latest langchain * add QA for langchain * Pre release mme/cloud * Pre release mme/cloud - exit pre mode * fix langchain qa * fix yarn create app * in node http, get api key from headers dict * Pre release mme/cloud * Pre release mme/cloud - exit pre mode * fix langserve qa
73 lines
2.0 KiB
Bash
Executable File
73 lines
2.0 KiB
Bash
Executable File
#!/bin/bash
|
|
source scripts/qa/lib/bash/prelude.sh
|
|
|
|
# Create the next app in /tmp
|
|
LC_APP_PATH="/tmp/test-langchain-app"
|
|
echo "Creating next app in $LC_APP_PATH"
|
|
echo ""
|
|
|
|
# Remove prev project and run create-next-app
|
|
rm -rf $LC_APP_PATH
|
|
npx create-next-app $LC_APP_PATH --ts --eslint --use-npm --no-tailwind --src-dir --app --import-alias="@/*"
|
|
|
|
# write to .env
|
|
echo "OPENAI_API_KEY=$OPENAI_API_KEY" > $LC_APP_PATH/.env
|
|
|
|
npm_install_packages $LC_APP_PATH
|
|
(cd $LC_APP_PATH && npm install @langchain/community@latest @langchain/core@latest @langchain/langgraph@latest @langchain/openai@latest)
|
|
|
|
cp scripts/qa/lib/langchain/page.tsx $LC_APP_PATH/src/app/page.tsx
|
|
|
|
# Open VSCode
|
|
code $LC_APP_PATH
|
|
|
|
mkdir -p $LC_APP_PATH/src/app/api/copilotkit/langchain/
|
|
cp scripts/qa/lib/langchain/route.ts $LC_APP_PATH/src/app/api/copilotkit/langchain/route.ts
|
|
|
|
prompt "Open route.ts. Is it without errors in VSCode?"
|
|
|
|
# Temporarily disable -e
|
|
set +e
|
|
|
|
pushd $LC_APP_PATH
|
|
|
|
npm run build
|
|
|
|
exit_status=$?
|
|
|
|
if [ $exit_status -eq 0 ]; then
|
|
succeed "$pkg_manager build succeeded."
|
|
else
|
|
fail "$pkg_manager build failed with status $exit_status."
|
|
exit 1
|
|
fi
|
|
|
|
# Re-enable -e
|
|
set -e
|
|
|
|
npm run dev > /dev/null 2>&1 &
|
|
|
|
pid1=$!
|
|
|
|
popd
|
|
|
|
prompt "Open http://localhost:3000. Is the page without errors?"
|
|
prompt "Chat to check if regular text and message history works (2x)?"
|
|
prompt "Ask the copilot to change the message. Is the message changed?"
|
|
prompt "Ask the copilot to change the message again. Is the message changed?"
|
|
prompt "Ask for a long message. Does the custom render work & stream?"
|
|
prompt "Does it provide the current message when asked?"
|
|
prompt "Test the keyboard shortcut cmd-\\ to open close the sidebar. Does it work?"
|
|
prompt "Does the text input autofocus when the sidebar is opened?"
|
|
prompt "In the text area, start a text about elephants. Does the autosuggestions work?"
|
|
|
|
killall next-server;
|
|
|
|
succeed "Test completed successfully."
|
|
|
|
echo "===================="
|
|
echo "Test completed at $(date)"
|
|
echo "===================="
|
|
|
|
exit 0
|