petercat-ai / petercat

A conversational Q&A agent configuration system, self-hosted deployment solutions, and a convenient all-in-one application SDK, allowing you to create intelligent Q&A bots for your GitHub repositories
https://petercat.ai
MIT License
595 stars 16 forks source link

fix: solve the error in bot creation #482

Closed xingwanying closed 4 days ago

vercel[bot] commented 4 days ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
petercat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 18, 2024 7:03am
petercat-assistant[bot] commented 4 days ago

Walkthrough

This pull request addresses an error in bot creation by refactoring the bot creation logic. It introduces changes to the bot creation parameters, ensuring that language and repository name are correctly handled. Additionally, it updates the bot's greeting and starter messages to be dynamically generated based on the language.

Changes

File Summary
assistant/src/Chat/index.tsx Removed redundant bot introduction message.
assistant/src/mock/bot.mock.ts Reformatted bot's hello message and starter questions.
client/app/factory/edit/page.tsx Modified bot creation call to include language parameter.
client/app/services/BotsController.ts Refactored createBot function to accept a parameter object.
server/agent/bot/bot_builder.py Minor formatting changes.
server/agent/prompts/bot_builder.py Enhanced prompt generation logic to include more starter questions.
server/bot/router.py Refactored bot creation endpoint to handle default messages and starters based on language.
codecov[bot] commented 4 days ago

Codecov Report

Attention: Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
server/bot/router.py 0.00% 8 Missing :warning:
server/agent/bot/bot_builder.py 0.00% 1 Missing :warning:
Files with missing lines Coverage Δ
server/agent/prompts/bot_builder.py 57.14% <ø> (ø)
server/agent/bot/bot_builder.py 72.72% <0.00%> (ø)
server/bot/router.py 19.68% <0.00%> (-0.43%) :arrow_down:

... and 1 file with indirect coverage changes