coleam00 / bolt.new-any-llm

Prompt, run, edit, and deploy full-stack web applications using any LLM you want!
https://bolt.new
MIT License
3.85k stars 1.58k forks source link

enhance prompt #325

Open svajagan opened 3 days ago

svajagan commented 3 days ago

enhance prompt

svajagan commented 3 days ago

it removes invalid provider error

kustomzone commented 3 days ago

Looks to be a duplicate line;

enhancePrompt={() => {
     enhancePrompt={() => {

No error after removing the second one.

coleam00 commented 3 days ago

Thanks @svajagan! @kustomzone are you saying you had to tweak it before getting it to work?

kustomzone commented 3 days ago

Line's been removed. Haven't tested further as not using providers.

chrismahoney commented 3 days ago

This worked for me via Ollama just fine, I'd ask the group @coleam00 @wonderwhy-er @emcconnell if you're able to test with other providers. Seems like it was just a leftover from the provider refactor and needed provider?.name updated.

chrismahoney commented 3 days ago

I'd love to see this fixed

iamvanca commented 2 days ago

Hi, I have discovered that if you add .name after provider in Chat.client.tsx (see attached image), it works with OpenRouter and OpenAI models but not with Anthropic models if you select Anthropic as a provider. If you select OpenRouter as a provider it works with Anthropic models. These are the only providers I have tested. enhance prompt

itsmebcc commented 2 days ago

Hi, I have discovered that if you add .name after provider in Chat.client.tsx (see attached image), it works with OpenRouter and OpenAI models but not with Anthropic models if you select Anthropic as a provider. If you select OpenRouter as a provider it works with Anthropic models. These are the only providers I have tested. enhance prompt

This worked for me using Ollama

coleam00 commented 7 hours ago

@iamvanca Does this mean you could just change provider.name to "provider?.name || provider"? So it would use provider.name only if it exists, otherwise go back to just using provider? Maybe I'm off track here, let me know!