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

Support Cloudflare official API, including model list. #38

Merged
merged 11 commits into from
Aug 1, 2024

Conversation

BrandonStudio
Copy link

Support for

  • Text Generation (chat)
  • List models (models)

✔ Support Streams.
✖ Does not support function calling for now.

Copy link

vercel bot commented Jul 31, 2024

@BrandonStudio is attempting to deploy a commit to the sxjeru's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Jul 31, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
lobe-chat ✅ Ready (Inspect) Visit Preview Jul 31, 2024 9:00am

@BrandonStudio
Copy link
Author

BaseURL is now supported, sharing one place with AccoutID.

I've changed description but not run i18n yet.

@sxjeru
Copy link
Owner

sxjeru commented Jul 31, 2024

Thank you for your contribution. I've noticed conflicts, please rebase the repository as well.
Then I will merge it.

@BrandonStudio
Copy link
Author

I think you'd better test once locally or in a codespace.
Then I would solve conflicts.

@BrandonStudio
Copy link
Author

I think it works well on Vercel now.

image

@BrandonStudio BrandonStudio marked this pull request as draft August 1, 2024 09:12
@BrandonStudio BrandonStudio marked this pull request as ready for review August 1, 2024 09:19
@BrandonStudio
Copy link
Author

To merge, please locally

  1. checkout to this PR to get the latest code, you can use gh command;
  2. checkout back to your own branch (cf);
  3. merge this PR by running git merge <branch name>, where <branch name> may be like pr/brandon...;
  4. modify code in src/config/llm.ts, to make sure it finally looks like
          ENABLED_AI360: !!process.env.AI360_API_KEY,
          AI360_API_KEY: process.env.AI360_API_KEY,
    
          ENABLED_CLOUDFLARE:
            !!process.env.CLOUDFLARE_API_KEY && !!process.env.CLOUDFLARE_BASE_URL_OR_ACCOUNT_ID,
          CLOUDFLARE_API_KEY: process.env.CLOUDFLARE_API_KEY,
          CLOUDFLARE_BASE_URL_OR_ACCOUNT_ID: process.env.CLOUDFLARE_BASE_URL_OR_ACCOUNT_ID,
  5. continue merge, you can either commit in an editor like VS Code or via CLI git merge --continue.

By the way, if you don't work on this any more, I would like to request for pulling directly to the main repo.

@sxjeru sxjeru merged commit 8469931 into sxjeru:cf Aug 1, 2024
1 check failed
@sxjeru
Copy link
Owner

sxjeru commented Aug 1, 2024

I'm not proficient in Git, so hopefully I did it right.

@BrandonStudio
Copy link
Author

I think you did it right.

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