AllYourBot / hostedgpt

An open version of ChatGPT you can host anywhere or run locally.
MIT License
269 stars 111 forks source link

Expand LanguageModel to know two more things about every LLM: context size and if it supports tool function calling #435

Open krschacht opened 2 weeks ago

krschacht commented 2 weeks ago

I think the function calling can just be a boolean: supports_tools. Inside the ai_backend's we need to make sure that a really long conversation starts skipping older messages so that the submitted payload never exceeds the context size. Maybe this attribute is simply context_window, that's what OpenAI and Anthropic both seems to call it.