GLLM Inference v0.5 to v0.6
As you may have noticed, several legacy modules in GLLM Inference v0.5 have been marked as deprecated for a while. If your application is still using them, you should have received warning logs.
Backward compatibility will be removed in the upcoming minor version v0.6.0. Please review this migration guide to ensure a smooth transition.
Note: If you've set the GLLM Inference dependency in your app as >=0.5.0, <0.6.0, you don't have to do this migration immediately, as you're locked to v0.5.x. You will only migrate to 0.6.0 when you choose to do so by updating your dependency to >=0.6.0.
However, its still recommended to do so ASAP to be able to access new features that will be added in the future.
Note: This guide is still a work in progress. More contents will be added gradually.
Builder
The
gllm_inference.builderpath is removed:To use EM invoker builder util, please use this new path:
from gllm_inference.em_invoker import build_em_invokerTo use LM invoker builder util, please use this new path:
from gllm_inference.lm_invoker import build_lm_invokerTo use LM request processor builder util, please use this new path:
from gllm_inference.request_processor import build_lm_request_processorThe
build_output_parserutil is removed along with the output parser modules. For more information, please refer to the output parser section.
EM Invoker
OpenAICompatibleEMInvokeris removed. To use OpenAI Embeddings API compatible providers, please use theOpenAIEMInvokerby providing abase_url.The temporary
twelevelabs_em_invokermodule (with misspelling) is removed. If you were importing from this module, please update your imports to usetwelvelabs_em_invoker(correct spelling) instead.
LM Invoker
OpenAICompatibleLMInvokeris removed. To use OpenAI Chat Completions API compatible providers, please use theOpenAIChatCompletionsLMInvokerby providing abase_url.LM invokers'
invoke()method will now always return anLMOutputobject regardless of whether it has non-text attributes or not. It will no longer returnstroutputs.Legacy streaming events format support is removed.
The new streaming events format can be achieved in
gllm_inference-v0.5by setting thesimplify_eventsparam toTrue. This temporary param is also removed ingllm_inference-v0.6.
LangChain Tool support is removed. Use GLLM Core's
tooldecorator orToolclass or instead:Provider-specific reasoning and thinking parameters are removed from all LM invokers. Use
ThinkingConfiginstead. You can obtain the keyword arguments for the provider by inspecting the provider's docs. Examples:The
Reasoningclass is renamed toThinking. Update all imports and usages:Note: The attribute name also changed from
reasoningtothinkingto better reflect the extended thinking capability.Removed
GoogleLMInvokersupport for passing Google Generative Language API/files/URLs as regularAttachmentobjects. UseUploadedAttachmentinstead:
Output Parser
The output parser modules under
gllm_inference.output_parserare removed altogether.If you're previously using
JSONOutputParser, please try to substitute it by assigningJSONOutputTransformerto your LM invoker as such:
LM Request Processor
LMRP's
process()method will now always return anLMOutputobject regardless of whether it has non-text attributes or not. It will no longer returnstroutputs.The
prompt_kwargsparameter inprocess()method is removed. Pass prompt kwargs as keyword arguments instead:The
key_defaultsparameter is removed. Useprompt_builder_kwargsinstead:in catalog:
in
build_lm_request_processor():
Prompt Builder
The
ignore_extra_keysparameter is removed fromPromptBuilder.__init__(). Extra keys inkwargswill now always raise a warning.The
kwargscolumn is now required in PromptBuilder catalog CSV/JSON files. For example:
LM Output Schema
The following properties have been removed:
response: Replaced bytext.reasoning: Replaced bythinkings.
Setting LM output items either directly during init or by setting attributes are no longer supported. Instead, please use the provided adder methods.
Realtime Chat
Realtime chat modules are removed, as they've been directly replaced by realtime session modules.
Last updated
Was this helpful?