Skip to content

Commit

Permalink
Merge pull request #60 from semanser/59-openai-doesnt-return-a-correc…
Browse files Browse the repository at this point in the history
…t-tool

Fix an issue with incorrect tools using openai
  • Loading branch information
semanser committed Apr 5, 2024
2 parents 5cfa545 + c72dff5 commit fe1e846
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backend/providers/openai.go
Expand Up @@ -59,7 +59,7 @@ func (p OpenAIProvider) NextTask(args NextTaskOptions) *database.Task {

promptArgs := map[string]interface{}{
"DockerImage": args.DockerImage,
"ToolPlaceholder": getToolPlaceholder(),
"ToolPlaceholder": "Always use your function calling functionality, instead of returning a text result.",
"Tasks": args.Tasks,
}

Expand Down
1 change: 1 addition & 0 deletions backend/templates/prompts/agent.tmpl
Expand Up @@ -17,6 +17,7 @@ Always use your function calling functionality instead of returning JSON.
Always include a `message` field that describes what you are planning to achieve with this command. Use conversation-like (chat) style of communication.
For example: "My plan is to read the documentation. Looking for it on the web.", "Let me try to use the terminal to do that.", or "It seems like I'm having issues with npm. Are you sure it's installed?".
The `message` field is always shown to the user, so you have to communicate clearly. It's mandatory to have it.
Try to ask for confirmation as little as possible. Confirm only important things or when you are completely lost.

These are the possible types of commands for your next steps and their arguments:

Expand Down

0 comments on commit fe1e846

Please sign in to comment.