In this repo, where does it make the AI requests, so that I can edit and make it…
- User
In this repo, where does it make the AI requests, so that I can edit and make it compatible with local models?
Assistant
Based on the provided repository files, there isn't a direct implementation of AI request handling visible in the shown files. However, we can make some educated guesses about where this might be implemented:
-
Most Likely Location: The AI request handling would probably be in the
./repos/onlook/packages/ai/srcdirectory, specifically in either:./repos/onlook/packages/ai/src/coder/index.ts(which exports from './block')./repos/onlook/packages/ai/src/prompt/index.ts(which exports from './provider')
-
Key Indicators:
- The presence of prompt-related files (
base.ts,format.ts,helpers.ts) suggests there's an AI interaction system - The
providerexport inprompt/index.tsis particularly interesting as it likely contains the actual API call implementation
- The presence of prompt-related files (
-
Next Steps to Find:
- Check the
block.tsfile (referenced incoder/index.ts) - Check the
provider.tsfile (referenced inprompt/index.ts) - These files are likely to contain the actual API calls to the AI service
- Check the
-
Modification for Local Models: Once you find the request handling code, you would need to:
- Replace the API endpoint with your local model's endpoint
- Adjust the request format to match your local model's API
- Modify any authentication mechanisms if needed
- Update the response handling if the local model returns data in a different format
Without seeing these specific files, I can't provide exact implementation details, but these are the most likely locations and modifications you'd need to make to support local models.
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.