Skip to content

feat: add custom claude interface#336

Open
WannaTen wants to merge 1 commit intoianarawjo:mainfrom
WannaTen:main
Open

feat: add custom claude interface#336
WannaTen wants to merge 1 commit intoianarawjo:mainfrom
WannaTen:main

Conversation

@WannaTen
Copy link

Hi, I noticed that this repository is relatively slow in supporting the latest models, so I implemented a custom solution for Claude to enable support for the latest features like prompt cache and thinking mode. I’m submitting this PR to see if it can be merged into the repository, providing everyone with an example of how to integrate models flexibly, along with a practical interface for real-world usage.

  • add prompt cache feature
    • by add mark '--cache--' inside the prompt node, make the long content before the mark cached. you can request claude once before a batch test to write the long text into cache, which will save a significant amount of token usage.
  • add claude-3-7-sonnet and its thinking mode

- add prompt cache feature
- add thinking mode

Signed-off-by: Yi Lin <teroincn@gmail.com>
@ianarawjo
Copy link
Owner

Hi WannaTen, great idea and nice implementation of it! It would be even better if these changes were made directly in the source code. Would you like to take a stab at that? I would want to merge these changes into ChainForge main, rather than add a custom provider script. I can correct your code from there.

The idea to use --cache-- and enable it only if the user toggles it ON is especially good.

@WannaTen
Copy link
Author

WannaTen commented Mar 21, 2025

Thanks for your appreciation. In fact, I am not proficient in TypeScript, so I added a custom provider. I can have a try on implementing the entire functionality using TypeScript to see how it goes.

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