CopilotForXcode icon indicating copy to clipboard operation
CopilotForXcode copied to clipboard

[Help Wanted]: I have a Copilot subscription but can't get it running in Xcode

Open carlca opened this issue 1 year ago • 29 comments

Before Reporting

  • [X] I have checked FAQ, and there is no solution to my issue
  • [X] I have searched the existing issues, and there is no existing issue for my issue

Describe your issue

  • Xcode 15.1 beta
  • macOS 13.6

I have an active Github Copilot subscription and have been using it in VS Code and Cursor ( a VS Code clone). I've installed the Copilot for Xcode extension and the extra option appears at the foot of the Editor menu in Xcode. So far, so good!

When I try to use the extension I get this error...

SCR-20231112-olje

I've been to the openai website and have generated a new API key, but I don't know how to add it to Copilot for Xcode!

Please can you or anyone reading this explain what I need to do? Thx! I promise I've checked the issues (both open and closed) and the FAQs 😉

carlca avatar Nov 12 '23 16:11 carlca

I looked at the instructions and saw that I hadn't completed the Github Copilot stage, even though I'm using Github Copilot in another editor (Cursor), so I completed these steps...

SCR-20231112-rvam

And tried again. It is still after my API key, which as I say, I have ready and waiting - I just need to know where to stick it 😉

carlca avatar Nov 12 '23 20:11 carlca

The chat and prompt to code feature are not provided by GitHub Copilot, please read the next section in the README.md to setup a chat model.

intitni avatar Nov 13 '23 04:11 intitni

Hello! Thanks for the reply. I've read though that section and added my new Chat GPT API Key...

image

Unfortunately, I am still getting the same error when I try hit the Test button!

image

What am I doing wrong? This is so frustrating!

carlca avatar Nov 13 '23 10:11 carlca

It's not the same error. You just don't have access to GPT-4 yet. Please check the link in the error message https://help.openai.com/en/articles/7102672-how-can-i-access-gpt-4 for details

intitni avatar Nov 13 '23 10:11 intitni

This is from https://chat.openai.com...

image

Now do you understand why I am finding the error messages and comments like "You just don't have access to GPT-4 yet" very frustrating!

Could you also tell me which of the Editor -> Copilot menu options I should use to access the Github Copilot facilities?

carlca avatar Nov 13 '23 10:11 carlca

ChatGPT Plus and the API thing are using different payment systems. From what I can see from the link, you have to use at least 1 USD before you can access GPT-4.

GitHub Copilot fetches suggestions automatically when you type, you can use the accept suggestion command to accept it. You can find the meanings of the other commands in the README.md in the Feature section.

intitni avatar Nov 13 '23 10:11 intitni

I've just added $10 to my Chat GPT API account. And after having to delete my existing API key and adding a new one, I'm now getting somewhere in terms of the Test button with Copilot for Xcode...

SCR-20231113-ktob

However, I am still getting the error in the Chat facility...

SCR-20231113-kvfl

Any ideas?

carlca avatar Nov 13 '23 11:11 carlca

Change the chat model in Feature - Chat to the new one.

intitni avatar Nov 13 '23 12:11 intitni

Thank you! I've got the Chat working now 😃

For the record, I've got a thirty year development career behind, so I don't think I am a stupid man, but I have to say that that process of getting it set up was much more difficult than it needed to be, with too many stages of the process relying on the user knowing things about Chat GPT in advance, that the docs don't tell you!

To be fair, I would say that openai are guilty of the same thing. It was only half an hour ago that I discovered that the Chat GPT API service was a separate thing from the Chat GPT Plus!

This afternoon, I will try to get the Github Copilot suggestions working. You may hear from me again 😉

carlca avatar Nov 13 '23 12:11 carlca

I have same headache! To be able to use that Copilot for Xcode's chat and suggestions and get rid of that 'You didn't provide an API key ...' thing I have to buy separate Chat GPT API service in addition to my current Chat GPT 4 subscription?

emrdgrmnci avatar Nov 25 '23 13:11 emrdgrmnci

@emrdgrmnci Yes

intitni avatar Nov 25 '23 13:11 intitni

Thank you! So, I couldn't find the place for buying that additional ChatGPT API subscription. Can you guide me?

emrdgrmnci avatar Nov 25 '23 13:11 emrdgrmnci

@emrdgrmnci you can create a key in the the user settings page on openai.com

https://platform.openai.com/api-keys

intitni avatar Nov 25 '23 13:11 intitni

@intitni I have already created and pasted API key into the Copilot for Xcode but still getting error "You didn't provide an API key. You need to provide your API key in an Authorization header using Bearer auth (i.e. Authorization: Bearer YOUR_KEY), or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys."

emrdgrmnci avatar Nov 25 '23 13:11 emrdgrmnci

@emrdgrmnci Please make sure that

  1. You have selected the key in the chat model settings.
  2. You have selected the correct model in the chat feature settings.

If the issue persists, please post the screenshots of the two pages here.

intitni avatar Nov 25 '23 13:11 intitni

I'm a Chat GPT Plus subscriber and I'm able to use Chat GPT-4, but I tried with all Model Names (gpt-4, gpt-3,5 and so on..) but still getting that You didn't provide an API key... error

Screenshot 2023-11-25 at 16 37 49 Screenshot 2023-11-25 at 16 40 04 Screenshot 2023-11-25 at 16 40 31

emrdgrmnci avatar Nov 25 '23 13:11 emrdgrmnci

@emrdgrmnci It looks like the error message is about insufficient quota, from the second screenshot. Chat GPT Plus and the API key are two different products using different billing system, please check that your billing information is correct on openai.com.

intitni avatar Nov 25 '23 13:11 intitni

Yes, I understood they are different and I have only Chat GPT Plus subscription for now. And, I'm still not able to find their another subscription and paying page for the API key. But, it's ridiculous to already setting API key through Chat GPT Plus subscription as well.

In that case, what I understand is, I need to buy Chat GPT API subscription for getting it's API key which is other than Chat GPT Plus API key.

emrdgrmnci avatar Nov 25 '23 14:11 emrdgrmnci

@emrdgrmnci try this page https://platform.openai.com/account/billing/overview

intitni avatar Nov 25 '23 14:11 intitni

I bought 6$ Chat GPT API subscription but still there's no luck! Also, I updated to Copilot for Xcode to version 0.27.1 and when I selected gpt-4-vision-preview as a Model Name, app is crashed at all.

Screenshot 2023-11-25 at 17 32 26 Screenshot 2023-11-25 at 17 32 36 Screenshot 2023-11-25 at 17 33 51

emrdgrmnci avatar Nov 25 '23 15:11 emrdgrmnci

ok. finally, it worked! I was also added Codeium, and now I removed Codeium at all and Copilot started to work on.

emrdgrmnci avatar Nov 25 '23 15:11 emrdgrmnci

@emrdgrmnci Glad to hear that. Please send me the crash log if possible. You can find it from the Console.app.

intitni avatar Nov 25 '23 15:11 intitni

@intitni any idea on this? copilot-chat

API Key added & test is a success in the host app settings. /run commands work but anything else does not work in the chat and gives this SSL error

varyP avatar Nov 30 '23 06:11 varyP

@varyP Sorry I have no idea if the test in the host app is a success.. Can you show me the chat model settings?

intitni avatar Nov 30 '23 06:11 intitni

@varyP Sorry I have no idea if the test in the host app is a success.. Can you show me the chat model settings?

image

varyP avatar Nov 30 '23 06:11 varyP

@varyP I have updated the app to dump more information about the chat error. Please send a message in the chat panel and post the detailed error message here.

https://drive.google.com/file/d/1jfsm1yzoiNTtcDL9ftXiH8JryrdDCmSC/view?usp=share_link

intitni avatar Nov 30 '23 07:11 intitni

Is it possible to use github copilot to suppurt code chat? Just like vscode github copilot's feature?

Never mind, I figured it out. Q: Can I use the GitHub Copilot Chat A: No, they don't have any public API for it yet.

wnykuang avatar Jan 28 '24 19:01 wnykuang

Is it possible to use github copilot to suppurt code chat? Just like vscode github copilot's feature?

Never mind, I figured it out. Q: Can I use the GitHub Copilot Chat A: No, they don't have any public API for it yet.

@wnykuang Actually there is a possible solution now, but not validated yet. Please keep an eye on this issue #380

You can also find a workaround solution at the very bottom of the issue.

intitni avatar Jan 29 '24 13:01 intitni

I am having the same problem.

LARSXX avatar Jun 01 '24 04:06 LARSXX