openchatai / copilot

🤖 🔥 Language-to-actions engine

Home Page:https://open.cx

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I provide code examples in the chat box of OpenCopilot; what format does it accept as input?

tpmccallum opened this issue · comments

Is your feature request related to a problem? Please describe.
I would like OpenCopilot to help me with writing code e.g. updating existing code to be compatible with a new SDK

Describe the solution you'd like
I would like to paste in my original code from version 1.x of my SDK and then get OpenCopilot to return me an altered version of that original code that will work with version 2.x of my SDK

Describe alternatives you've considered
I asked it to read a documentation web page and provide me with an updated version of the code. It said it can not directly access or browse the internet and that I should provide the OpenCopilot with some specific code samples instead.

Additional context
I tried to paste in raw Rust code but OpenCopilot chat input box was not able to determine what that was. I then used a codeblock (like you would use in Markdown e.g. code goes here but that did not work).

How do you provide code to the chat bot?

Actually, small snippets of code (one-liners) in triple backticks do work.
I am pasting in several lines of code using triple backticks but am getting an error.
Screenshot 2023-12-21 at 10 17 13

The issue at hand is related to the context limit, currently set to 255 characters. This limit can be adjusted through the dashboard folder and the llm-server /chat/send endpoint. Currently, the bot lacks the ability to browse web pages, but I'll submit an enhancement request to address this.

you can setup a base prompt in the settings under 'context.'

cc: @ah7255703 can we convert it to an environment variable or remove that check completely from nextjs so that it can be handled on the backend ?