Skip to content

Commit

Permalink
fix: fix the function call tool result (#343)
Browse files Browse the repository at this point in the history
* fix: solve the warning message when paste text int the chat input

* chore: release v1.0.2

* chore: update the icon

* chore: update the icon

* fix: fix the function call tool result

* chore: release 1.0.3

* chore: update the lock
  • Loading branch information
xingwanying authored Sep 4, 2024
1 parent b9956e3 commit 8a62e8a
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 23 deletions.
7 changes: 2 additions & 5 deletions assistant/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@petercatai/assistant",
"version": "1.0.1",
"version": "1.0.3",
"description": "Peter Cat Assistant Application",
"module": "dist/esm/index.js",
"types": "dist/esm/index.d.ts",
Expand All @@ -16,7 +16,7 @@
},
"scripts": {
"start": "npm run dev",
"dev": "npm run build:css & dumi dev",
"dev": "dumi dev",
"build:css": "tailwindcss -i tailwind.css -o ./src/style.css",
"build": "npm run build:css && cp ./src/style.css ./.dumi/tmp/style.css && father build",
"build:watch": "father dev",
Expand All @@ -30,9 +30,6 @@
},
"authors": [],
"license": "MIT",
"files": [
"dist"
],
"sideEffects": [
"**/*.css"
],
Expand Down
2 changes: 1 addition & 1 deletion assistant/src/icons/ThunderIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const ThunderIcon = () => {
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
fillRule="evenodd"
clip-rule="evenodd"
d="M9.74348 1.0633C9.94431 1.17526 10.0429 1.40975 9.98239 1.63158L8.65464 6.50002H13.5C13.6991 6.50002 13.8792 6.61814 13.9586 6.80074C14.0379 6.98335 14.0014 7.19562 13.8655 7.34118L6.86554 14.8412C6.70866 15.0093 6.45736 15.0487 6.25654 14.9367C6.05571 14.8248 5.95713 14.5903 6.01763 14.3685L7.34539 9.50002H2.50001C2.30091 9.50002 2.12079 9.38189 2.04144 9.19929C1.96209 9.01669 1.99863 8.80441 2.13448 8.65886L9.13448 1.15886C9.29137 0.990769 9.54266 0.951339 9.74348 1.0633Z"
fill="white"
Expand Down
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@fullpage/react-fullpage": "^0.1.42",
"@next/bundle-analyzer": "^13.4.19",
"@nextui-org/react": "^2.2.9",
"@petercatai/assistant": "^1.0.0",
"@petercatai/assistant": "^1.0.3",
"@supabase/supabase-js": "^2.32.0",
"@tanstack/react-query": "^5.17.19",
"@types/node": "20.4.5",
Expand Down
4 changes: 2 additions & 2 deletions client/public/icons/CheckBadgeIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const CheckBadgeIcon = () => (
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
fillRule="evenodd"
clipRule="evenodd"
d="M13.1222 10.1218C13.882 9.71897 14.3996 8.91992 14.3996 7.99998C14.3996 7.08003 13.882 6.28098 13.1222 5.87814C13.3746 5.05599 13.1756 4.12498 12.5251 3.47447C11.8746 2.82397 10.9436 2.62495 10.1214 2.87741C9.7186 2.11756 8.91955 1.59998 7.99961 1.59998C7.07966 1.59998 6.28061 2.11757 5.87777 2.87743C5.05563 2.62498 4.12462 2.824 3.47413 3.4745C2.82363 4.125 2.62461 5.056 2.87705 5.87814C2.1172 6.28098 1.59961 7.08003 1.59961 7.99998C1.59961 8.91992 2.1172 9.71897 2.87705 10.1218C2.6246 10.944 2.82362 11.875 3.47412 12.5255C4.12462 13.176 5.05563 13.375 5.87778 13.1225C6.28062 13.8824 7.07967 14.4 7.99961 14.4C8.91956 14.4 9.71861 13.8824 10.1214 13.1225C10.9436 13.375 11.8746 13.1759 12.5251 12.5254C13.1756 11.875 13.3746 10.944 13.1222 10.1218ZM11.0849 6.55288C11.2798 6.28489 11.2205 5.90964 10.9525 5.71473C10.6845 5.51983 10.3093 5.57908 10.1144 5.84707L7.32736 9.6792L5.82387 8.17571C5.58956 7.9414 5.20966 7.9414 4.97535 8.17571C4.74103 8.41003 4.74103 8.78992 4.97535 9.02424L6.97535 11.0242C7.09942 11.1483 7.2716 11.2119 7.44654 11.1981C7.62148 11.1844 7.78164 11.0948 7.88485 10.9529L11.0849 6.55288Z"
fill="#6B7280"
/>
Expand Down
4 changes: 2 additions & 2 deletions client/public/icons/ErrorBadgeIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const ErrorBadgeIcon = () => (
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
fillRule="evenodd"
clipRule="evenodd"
d="M14.3996 7.99998C14.3996 11.5346 11.5342 14.4 7.99961 14.4C4.46499 14.4 1.59961 11.5346 1.59961 7.99998C1.59961 4.46535 4.46499 1.59998 7.99961 1.59998C11.5342 1.59998 14.3996 4.46535 14.3996 7.99998ZM7.99961 3.99998C8.33098 3.99998 8.59961 4.2686 8.59961 4.59998V8.19998C8.59961 8.53135 8.33098 8.79998 7.99961 8.79998C7.66824 8.79998 7.39961 8.53135 7.39961 8.19998V4.59998C7.39961 4.2686 7.66824 3.99998 7.99961 3.99998ZM7.99961 12C8.44144 12 8.79961 11.6418 8.79961 11.2C8.79961 10.7581 8.44144 10.4 7.99961 10.4C7.55778 10.4 7.19961 10.7581 7.19961 11.2C7.19961 11.6418 7.55778 12 7.99961 12Z"
fill="#DC2626"
/>
Expand Down
4 changes: 2 additions & 2 deletions client/public/icons/HomeIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const HomeIcon = () => (
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
fillRule="evenodd"
clipRule="evenodd"
d="M11.1519 2.75137C11.6205 2.28275 12.3803 2.28275 12.849 2.75137L21.249 11.1514C21.5922 11.4946 21.6948 12.0107 21.5091 12.4591C21.3233 12.9075 20.8858 13.1999 20.4004 13.1999H19.2004V20.3999C19.2004 21.0626 18.6632 21.5999 18.0004 21.5999H15.6004C14.9377 21.5999 14.4004 21.0626 14.4004 20.3999V16.7999C14.4004 16.1372 13.8632 15.5999 13.2004 15.5999H10.8004C10.1377 15.5999 9.60043 16.1372 9.60043 16.7999V20.3999C9.60043 21.0626 9.06317 21.5999 8.40043 21.5999H6.00043C5.33768 21.5999 4.80043 21.0626 4.80043 20.3999V13.1999H3.60043C3.11507 13.1999 2.67751 12.9075 2.49177 12.4591C2.30603 12.0107 2.4087 11.4946 2.7519 11.1514L11.1519 2.75137Z"
fill="#6B7280"
/>
Expand Down
4 changes: 2 additions & 2 deletions client/public/icons/MinusCircleIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const MinusCircleIcon = () => (
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
fillRule="evenodd"
clipRule="evenodd"
d="M7.99961 14.4C11.5342 14.4 14.3996 11.5346 14.3996 7.99998C14.3996 4.46535 11.5342 1.59998 7.99961 1.59998C4.46499 1.59998 1.59961 4.46535 1.59961 7.99998C1.59961 11.5346 4.46499 14.4 7.99961 14.4ZM5.39961 7.39998C5.06824 7.39998 4.79961 7.6686 4.79961 7.99998C4.79961 8.33135 5.06824 8.59998 5.39961 8.59998H10.5996C10.931 8.59998 11.1996 8.33135 11.1996 7.99998C11.1996 7.6686 10.931 7.39998 10.5996 7.39998H5.39961Z"
fill="#9CA3AF"
/>
Expand Down
4 changes: 2 additions & 2 deletions client/public/icons/PlayIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ const PlayIcon = () => (
focusable="false"
>
<path
fill-rule="evenodd"
fillRule="evenodd"
d="M4.5 5.653c0-1.426 1.529-2.33 2.779-1.643l11.54 6.348c1.295.712 1.295 2.573 0 3.285L7.28 19.991c-1.25.687-2.779-.217-2.779-1.643V5.653z"
clip-rule="evenodd"
clipRule="evenodd"
></path>
</svg>
);
Expand Down
4 changes: 2 additions & 2 deletions client/public/icons/RefreshIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const RefreshIcon = () => (
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
fillRule="evenodd"
clipRule="evenodd"
d="M12.2502 9.13886C11.6212 11.4861 9.20854 12.8791 6.86129 12.2501C6.08607 12.0424 5.41644 11.6411 4.88866 11.1123L4.63943 10.8631L6.58601 10.8628C6.91738 10.8627 7.18596 10.594 7.18591 10.2627C7.18585 9.93128 6.91717 9.6627 6.5858 9.66276L3.19105 9.66337C3.03192 9.6634 2.87932 9.72664 2.76681 9.83919C2.65431 9.95173 2.59113 10.1044 2.59116 10.2635L2.59187 13.657C2.59194 13.9883 2.86063 14.2569 3.192 14.2568C3.52337 14.2568 3.79194 13.9881 3.79187 13.6567L3.79146 11.7122L4.03935 11.9601C4.71217 12.6341 5.56632 13.1455 6.5507 13.4092C9.53811 14.2097 12.6088 12.4369 13.4093 9.44944C13.495 9.12936 13.3051 8.80036 12.985 8.7146C12.6649 8.62883 12.3359 8.81878 12.2502 9.13886ZM13.2333 6.16095C13.3458 6.04841 13.409 5.89577 13.409 5.73662L13.4084 2.34307C13.4084 2.0117 13.1397 1.74311 12.8083 1.74316C12.477 1.74322 12.2084 2.01189 12.2084 2.34326L12.2088 4.28796L11.9609 4.04011C11.2881 3.36617 10.4338 2.85461 9.44948 2.59087C6.46207 1.7904 3.39138 3.56326 2.59091 6.55067C2.50514 6.87075 2.69509 7.19975 3.01517 7.28552C3.33525 7.37128 3.66425 7.18133 3.75002 6.86125C4.37896 4.514 6.79164 3.12104 9.13889 3.74998C9.91414 3.95771 10.5838 4.35905 11.1116 4.88783L11.3605 5.13672L9.41489 5.13672C9.08352 5.13672 8.81489 5.40535 8.81489 5.73672C8.81489 6.06809 9.08352 6.33672 9.41489 6.33672H12.809C12.9681 6.33672 13.1208 6.27349 13.2333 6.16095Z"
fill="white"
/>
Expand Down
8 changes: 4 additions & 4 deletions client/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2656,10 +2656,10 @@
resolved "https://registry.npmjs.org/@panva/hkdf/-/hkdf-1.2.1.tgz#cb0d111ef700136f4580349ff0226bf25c853f23"
integrity sha512-6oclG6Y3PiDFcoyk8srjLfVKyMfVCKJ27JwNPViuXziFpmdz+MZnZN/aKY0JGXgYuO/VghU0jcOAZgWXZ1Dmrw==

"@petercatai/assistant@^1.0.0":
version "1.0.0"
resolved "https://registry.npmjs.org/@petercatai/assistant/-/assistant-1.0.0.tgz#cb05d5247126ade08a1fedaf1999f406e3feaf35"
integrity sha512-7BpHBHfV0FcWw3PFmlxhyJVQ9287RKASKOcYDc8qtbrosa2tfifNGFM9MEvVbqbJr+O2YniBbPJOyRwgGijDEA==
"@petercatai/assistant@^1.0.2":
version "1.0.2"
resolved "https://registry.npmjs.org/@petercatai/assistant/-/assistant-1.0.2.tgz#2f824180097eebcacef7106089e3854adee5ca04"
integrity sha512-EG3KAmKmK8VXiH/fbetxz8fB8vBMvfrAdX05+6E5QnRosV/fEMv+qc9PGxVF7pTlHayI3FcHX2Qexf4HSDss/Q==
dependencies:
"@ant-design/icons" "^5.3.5"
"@ant-design/pro-chat" "^1.9.0"
Expand Down
1 change: 1 addition & 0 deletions server/agent/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ async def run_stream_chat(self, input_data: ChatData) -> AsyncIterator[str]:

yield f"data: {json_output}\n\n"
elif kind == "on_tool_end":
children_value = event["data"].get("output", {})
if isinstance(children_value, str):
try:
parsed_children_value = json.loads(children_value)
Expand Down

0 comments on commit 8a62e8a

Please sign in to comment.