Detailing function calling execution history prompt #1177
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request to
packages/agent
includes several changes to improve functionality and add new features. The most important changes include updating the package version, enhancing the prompts for better clarity, and modifying the function call handling in theChatGptHistoryDecoder
andChatGptSelectFunctionAgent
namespaces. Additionally, the test script has been updated to read the Swagger document from a local file and log function call details.Version Update:
packages/agent/package.json
: Updated the version from0.2.1
to0.2.3
.Enhancements to Prompts:
packages/agent/prompts/execute.md
: Added a description of thefunction
anddata
properties in the "tool" role message content.packages/agent/prompts/select.md
: Added instructions to consider the relationship and prerequisites between functions when selecting functions to call.packages/agent/src/internal/NestiaChatAgentSystemPrompt.ts
: Updated theEXECUTE
andSELECT
prompts with additional context and instructions.Function Call Handling:
packages/agent/src/chatgpt/ChatGptHistoryDecoder.ts
: Modified thecontent
property to include detailed metadata and status of the API operation.packages/agent/src/chatgpt/ChatGptSelectFunctionAgent.ts
: Included themethod
andpath
properties in the function candidates' JSON representation.Test Script Updates:
packages/agent/test/cli.ts
: Changed to read the Swagger document from a local file and added functionality to log function call details and handle additional commands like$usage
and$exit
. [1] [2] [3] [4]