Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add custom endpoint for AI suggestion #4319

Merged
merged 1 commit into from
Jan 4, 2024
Merged

add custom endpoint for AI suggestion #4319

merged 1 commit into from
Jan 4, 2024

Conversation

yann300
Copy link
Contributor

@yann300 yann300 commented Dec 8, 2023

create a script in Remix:
like

(async () => {
  try {
    remix.call('copilot-suggestion' as any, 'useRemoteService', 'http://replit.remixcompletion.pro/infer')
    console.log('done')
  } catch (e) {
    console.log(e.message)
  }
})()

and run it to use a remote endpoint instead of the in-browser model.

@yann300 yann300 added the WIP label Dec 8, 2023
Copy link

netlify bot commented Dec 8, 2023

Deploy Preview for remixproject ready!

Name Link
🔨 Latest commit c588e5f
🔍 Latest deploy log https://app.netlify.com/sites/remixproject/deploys/6596bf0840335e0008571607
😎 Deploy Preview https://deploy-preview-4319--remixproject.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@yann300 yann300 changed the title add custom endpoint add custom endpoint for AI suggestion Dec 8, 2023
@yann300 yann300 requested a review from STetsing December 8, 2023 12:33
@STetsing
Copy link
Collaborator

STetsing commented Dec 8, 2023

@yann300 where am I supposed to execute that JS?

@yann300
Copy link
Contributor Author

yann300 commented Dec 10, 2023

@STetsing you have to run it from Remix.

Copy link
Collaborator

@STetsing STetsing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The results is not displayed in the editor, Increasing the request timeout (if existent) could help

@STetsing
Copy link
Collaborator

  • The replit endpoints works well
  • the starcoder endpoint ends up with a Failed to load resource: net::ERR_FAILED starcoder.remixcompletion.pro/infer

@yann300
Copy link
Contributor Author

yann300 commented Dec 12, 2023

  • The replit endpoints works well
  • the starcoder endpoint ends up with a Failed to load resource: net::ERR_FAILED starcoder.remixcompletion.pro/infer

the second issue looks like a server issue, is this the case?

@STetsing
Copy link
Collaborator

  • The replit endpoints works well
  • the starcoder endpoint ends up with a Failed to load resource: net::ERR_FAILED starcoder.remixcompletion.pro/infer

the second issue looks like a server issue, is this the case?

no, the server returns a payload indeed, what is the request max timeout? the min inference time for starcoder ti max_new_word=5 is 6-5 seconds (mean value).

@yann300
Copy link
Contributor Author

yann300 commented Dec 12, 2023

what is the request max timeout

I think this can be configured by passing some options to https://github.com/ethereum/remix-project/pull/4319/files#diff-456892ab56ea0fe769bc1bdb2c0ece2855f1ce80583e2309939106e9cf727f0eR68 but I don't know the default value..

@STetsing STetsing closed this Dec 19, 2023
@STetsing
Copy link
Collaborator

The endpoints works well after reducing the max number of tokens (especially for the starcoder model). The timeout value must be increased for large generation requests

@yann300 yann300 reopened this Jan 4, 2024
@yann300 yann300 requested a review from STetsing January 4, 2024 14:22
@yann300 yann300 removed the WIP label Jan 4, 2024
Copy link
Collaborator

@STetsing STetsing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working as Is

@yann300 yann300 enabled auto-merge January 4, 2024 14:26
@yann300 yann300 merged commit bb81c55 into master Jan 4, 2024
32 checks passed
@yann300 yann300 deleted the endpoint_ai branch January 4, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants