-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
WIP: Auto mode rework #48
base: master
Are you sure you want to change the base?
Conversation
@dnakov :) |
Omg this pr couldnt be bigger |
hihi. I'm not done |
Oh, this one -_-. I was close enough tho
|
@nitanmarcel before you get too far.. All of these can just be served via a single litellm call like in ui/chat.py |
I think @trufae said something about not wanting litellm implemented. Which is extra fine by me since I can transform the process function in a decorator and have it hold an argument to pre-process the response |
Would be something like:
|
Tho it implies that it supports the same tool format. Can create a pre_processor argument for that too |
@trufae We should resolve this as we're basically going to be replicating litellm. They've done all the model request/response parsing in there and consolidated all to the openai spec. |
Took a deeper look at what instructor (a new library we use here) does under the hood to support other llm's tools and it has everything I need to easily implement the tools. Parsing the raw response needs to be done from scratch but I have the old code for that |
Yeah, I've used instructor. But with litellm, you don't need to parse anything raw. I have no interest in maintaining transformations for so many models when it already exists, this isn't the primary point of this library. |
From what I've seen so far you still have to raw parse things, but there's the same response for all llms |
Yes, so you're only parsing 1 thing vs 1 for each API/model |
We'll have to wait for an answer from @trufae. |
Got the green. The other green not the high green |
What does that mean? |
I can use llmlite :) |
doesn''t work AttributeError: 'Delta' object has no attribute 'role' |
ah the version was too old, but still:
|
I do parse the funtions myself now so maybe this is my issue |
Yep, I forgot how generators work 😅 |
my comments on litellm:
so imho i would like to keep control on the llama side with chromadb and the prompt structure thing, at least as a separate codebase, even if its ugly i think this code gives us more control. let me know if i misunderstood anything from litellm. How are you planning to support litellm, if we will now support more models and reduce the logic handling all those models, the interface for the user will be the same? |
It is commercial, I think they got some VC funding, although it's at least MIT licensed.
I'm thinking we can just use their convention |
IAs long as we don't use their UI or their moderation tools we are covered by the MIT license. 2, doesn't happen since we use the conversation wrapper, it returns the same format as OpenAI for all endpoints. And we can use llama separately. About the size, it uses extras so in our case it only downloads the deps we need
|
On the other side
I don't think we even need to do constantly update our models, at least in auto only the provider is set. About the /model it can be done too without LLM by creating our own wrapper around the endpoints. Maybe who knows, I come over an idea to make it easier to maintain |
So, litellm or not, these can be done manually. + We can freely use parts of litellm in our code due to the dual license they use |
44b8109
to
82d5eb9
Compare
cea4fd0
to
c1f0e2e
Compare
7b871a3
to
d566c74
Compare
It's never used except in a function which was never used either (in the old code)
This was the only thing we used from it anyway
Might break openai? Can't test it right now, but I hope I can make both happy with a unified sollution instead of patching everything for each model
2182da5
to
7dbb064
Compare
abandoned? |
Nope will come back soon to it. Just taking a break since handling the functionary models drove me nuts xD |
Checklist
- [x] Rewrite most of the code- [X] Re-Implement OpenAI- [ ] Re-implement Anthropic- [ ] Re-Implement Llama- [ ] Re-Implement Bedrock- [ ] Re-Implement Groq- [ ] Re-Implement Google- [ ] Re-Implement NousResearch- [ ] Implement chromadb (Add radare documentation as knowledge base, promt the ai to return "memories" that can be saved and used later.