Skip to content

Support o-models #38

@marcorosa

Description

@marcorosa

OpenAI models o1 and o3-mini are available in AI Core and we can integrate them.

TBD

The following points require some attention in development and tests

  • generative-ai-hub-sdk: these models will be officially supported starting from v4.7.0, but do we need such version? In the end we delegate the completions to our adapter in llm.py
    • v4.7.0 may not be sufficient -> ref to my issue open
  • Remember these models do not support temperature nor many other parameters of regular gpt models, and have the max_tokens param renamed to max_completion_tokens
  • llm.py: as these models fall under AICoreOpenAILLM we may need to adapt the generate_completions_for_messages function
    • either replace these parameters depending on the model name
    • or extend the base class so to override generate_completions_for_messages and pass only supported models
    • an upgrade of the generative-ai-hub-sdk library should be sufficient to have a working ProxyOpenAI (i.e., gen_ai_hub.proxy.native.openai.OpenAI) class with all openai's models.
      • this class is defined and used for AICoreOpenAILLM which is also adopted for all openai-compatible models (i.e., ibm, opensource (mistral+llama), and mistral). They all need to be tested afterwards
      • LocalOpenAILLM extends AICoreOpenAILLM but override generate_completion_for_messages. Still, validate no issues are raised

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions