mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
Merge pull request #985 from estill01/patch-1
Enable setting default `model` value for `LiteLLM`, `Chat`, `Completions`
This commit is contained in:
commit
cc4a1d2603
1 changed files with 4 additions and 3 deletions
|
@ -105,9 +105,10 @@ class Completions():
|
||||||
def __init__(self, params):
|
def __init__(self, params):
|
||||||
self.params = params
|
self.params = params
|
||||||
|
|
||||||
def create(self, model, messages, **kwargs):
|
def create(self, messages, model=None, **kwargs):
|
||||||
for k, v in kwargs.items():
|
for k, v in kwargs.items():
|
||||||
self.params[k] = v
|
self.params[k] = v
|
||||||
|
model = model or self.params.get('model')
|
||||||
response = completion(model=model, messages=messages, **self.params)
|
response = completion(model=model, messages=messages, **self.params)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue