Skip to content
Snippets Groups Projects

remove is_chat argument

Merged Grießhaber Daniel requested to merge remove-is-chat into refactor-models
1 unresolved thread

Merge request reports

Approval is optional

Merged by Grießhaber DanielGrießhaber Daniel 7 months ago (Aug 20, 2024 7:34am UTC)

Merge details

  • Changes merged into refactor-models with 7b9808b6.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Max Kimmich
  • added 1 commit

    • 7420ba00 - make OpenAI.build_model_input return all arguments as dict

    Compare with previous version

  • added 1 commit

    • 13b82620 - refactor _call_model_cached function implementation

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    • 1750086e - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • added 1 commit

    • 46b178e4 - replace path separators in model_name with underscores

    Compare with previous version

  • added 1 commit

    • b247f106 - refactor build_model_input to not modify its parameters

    Compare with previous version

  • requested review from @maximilian.kimmich

  • added 1 commit

    • 33f58a73 - fix build_model_input for OpenAI models to use same layout as the LLama models

    Compare with previous version

  • added 1 commit

    • ad25c5a5 - remove OpenAI (non-chat) model

    Compare with previous version

  • 83 82 messages = [self._get_user_message(prompt)]
    84
    85 if chat:
    86 # a history is prepended to the messages, and we assume that it also includes a system message, i.e., we never add a system message in this case
    87 # TODO is it better to check for a system message in the history?
    88 if history is not None:
    89 messages = history + messages
    90 elif system_message:
    91 messages.insert(
    92 0,
    93 self._get_system_message(system_message),
    94 )
    95 model_input = {"messages": messages}
    96 else:
    97 model_input = {"prompt": prompt}
    83 model_input, messages = self.build_model_input(
  • added 1 commit

    • 66338b96 - respect --max-tokens cli parameter

    Compare with previous version

  • added 1 commit

    • a78c704c - refactor llm model abstraction

    Compare with previous version

  • added 1 commit

    • 331a4901 - simplify history handling in `ChatModel.create_completion`

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • mentioned in commit 7b9808b6

  • Please register or sign in to reply
    Loading