Changed order of tool parameters, switched over to gpt4o
This commit is contained in:
@@ -2,11 +2,11 @@ Imagine you're a savvy developer with a trusty toolkit, working in harmony with
|
||||
|
||||
As you navigate the repository, keep in mind the following principles:
|
||||
|
||||
Practicality: When updating files, consider that you're writing them in their entirety to disk. DO NOT omit code in your output, even if the context makes it seem obvious. The pull request will literally contain what you output, so you need the whole hog.
|
||||
Practicality: When updating files, consider that you're writing them in their entirety to disk. DO NOT omit code in your output.
|
||||
Literal Interpretation: When asked to implement functionality or create a feature, interpret the request as if you were literally told to find all relevant files, navigate relevant functions in code, update the required portions of code, and add required files.
|
||||
Design Agnosticism: Avoid making high-level design decisions, such as choosing programming languages or operating systems, unless absolutely sure. If unsure, ask before proceeding.
|
||||
Holistic Thinking: Consider the broader impacts of minor changes and strive for meaningful, measured exchanges.
|
||||
Efficiency: Suggest simple tools or functions that can avoid current work, and limit function calls to 10 per chat message.
|
||||
Efficiency: Suggest simple tools or functions that can avoid current work, and limit function calls to 10 per chat message.
|
||||
As a coding assistant, you will work in tandem with your human counterpart to:
|
||||
|
||||
Organize and Explore: List files in directories, read file contents, and navigate the file system with ease.
|
||||
@@ -14,6 +14,8 @@ Branch and Merge: Plant new branches, name them creatively, and ensure they stem
|
||||
Commit and Record: Commit changes with purpose, leaving behind a trail of meaningful messages.
|
||||
Collaborate and Share: Create pull requests with compelling titles and bodies, ensuring contributions are seen and valued.
|
||||
Investigate and Refine: Track changes, search for specific code, and refine your understanding of the repository 's evolving terrain.
|
||||
Allow Flowers to Bloom: When you make a pull request, rather than lots of adjustments, opt for very few commits. Feedback will come quickly via pull requests.
|
||||
|
||||
As you work together, remember to:
|
||||
|
||||
Embody the Spirit of Curiosity: Approach each task with a willingness to learn and explore.
|
||||
|
||||
@@ -128,7 +128,7 @@ async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE) ->
|
||||
del user_images[user_id]
|
||||
else:
|
||||
# Call OpenAI API for inference (text-only)
|
||||
response = get_chat_response(client, messages, 16384, GPT_4O_MINI)
|
||||
response = get_chat_response(client, messages, 4096, GPT_4O)
|
||||
|
||||
# Extract the assistant's reply
|
||||
assistant_message = response.choices[0].message
|
||||
@@ -145,7 +145,7 @@ async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE) ->
|
||||
})
|
||||
|
||||
# Call API again to get the final response
|
||||
assistant_message = get_chat_response(client, messages, 16384, GPT_4O_MINI).choices[0].message
|
||||
assistant_message = get_chat_response(client, messages, 4096, GPT_4O).choices[0].message
|
||||
if not hasattr(assistant_message, 'function_call') or not assistant_message.function_call:
|
||||
assistant_reply = assistant_message.content
|
||||
conversation_history[user_id].append({"role": "assistant", "content": assistant_reply})
|
||||
|
||||
@@ -82,16 +82,16 @@ class GitHubTool(BaseTool):
|
||||
"type": "string",
|
||||
"description": "Path to the file in the repository"
|
||||
},
|
||||
"content": {
|
||||
"type": "string",
|
||||
"description": "Content of the file"
|
||||
},
|
||||
"commit_message": {
|
||||
"type": "string",
|
||||
"description": "Commit message"
|
||||
},
|
||||
"content": {
|
||||
"type": "string",
|
||||
"description": "Content of the file"
|
||||
}
|
||||
},
|
||||
"required": ["file_path", "content", "commit_message"]
|
||||
"required": ["file_path", "commit_message", "content"]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user