Lisoveliy / StarCoderEx

Extension for using alternative GitHub Copilot (StarCoder API) in VSCode
https://marketplace.visualstudio.com/items?itemName=Lisoveliy.starcoderex
MIT License
99 stars 16 forks source link

Selecting Code for Prompt Opens Up Hugging Face Website Despite Keying In Key #8

Closed zactionn closed 1 year ago

zactionn commented 1 year ago

Does not work despite inserting the key from huggingface

IJOY94 commented 1 year ago

Same here.

propercroc commented 1 year ago

same here. Plus, an already entered key in VS settings will disappear once the errors occurs.

Lisoveliy commented 1 year ago

Sorry but now Reference API is disabled, Wait until server is up.

propercroc commented 1 year ago

Wow, that was fast. Indeed, it works now. Thanks a lot!

Lisoveliy commented 1 year ago

Thanks for callback. I added error message for this issue.

propercroc commented 1 year ago

Just playing around with this, really like it. But still, I get vastly different results asking with the same prompt on https://huggingface.co/chat/conversation/645a6bc15b0e3d216799742f and I wondered if you have any thoughts on this:

write markdown code for a short story of a train that meets a cactus.

In[1]:

import random import time import sys import os import re import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib.image as mpimg import matplotlib.animation as animation from IPython.display import HTML from IPython.display import display from IPython.display import Image from IPython

description of the function.

#

The first line of the docstring is a summary.

short summary of the function.

# #

The rest of the docstring should be a more detailed description of the function.

# # #

The docstring can contain a list of parameters, one parameter per line,

with a colon and a space

While on https://huggingface.co/chat/conversation/645a6bc15b0e3d216799742f, i get:

Sure thing. Here goes...

A train arrives at a station. On the platform, a man stands before him saying “Welcome”. He asks whether he needs anything. He says no. Then he walked away without looking around. After walking past the station, the train stopped suddenly. There were three passengers standing next to each other. One of them looked at his watch which showed time as 1 o'clock. Another guy took off his shoes and put on his socks while another guy got ready to leave. When everyone was done getting ready, someone opened the door and announced “We're leaving now”. Everyone went outside except for the last one who stood still waiting for others to finish their tasks. As soon as everybody finished their task, the last one stepped forward and asked “Can anyone open the door please?”. All the guys replied yes. After opening the door, the last guy entered the carriage.

Model: BigCode/StarCoderBase https://huggingface.co/bigcode/starcoderbase

wxfvf commented 1 year ago

same here. I used the code: API_URL = "https://api-inference.huggingface.co/models/bigcode/starcoder" headers = {"Authorization": "Bearer *****"}

def query(payload): response = requests.post(API_URL, headers=headers, json=payload) return response.json()

output = query({ "inputs": "# post request with parameter url and json payload", }) I got: [{'generated_text': '# post request with parameter url and json payload\ndef post_request(url, payload):\n response = requests.post(url, json'}]

when i used starcoderex with the same token, i got "bearer invalid!"

Lisoveliy commented 1 year ago

Fixed?