Update Ollama.py

pull/1914/head
hdsz25 4 weeks ago committed by GitHub
parent 6c9fd2682c
commit 6503405630
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -19,9 +19,9 @@ class Ollama(AsyncGeneratorProvider, ProviderModelMixin):
@classmethod
async def create_async_generator(
cls,
model: str,
messages: Messages,
proxy: str = None,
model: str = 'phi3',
timeout: int = 120,
api_key: str = 'Ollama',
api_base: str = "http://localhost:11434/v1/",
@ -34,6 +34,8 @@ class Ollama(AsyncGeneratorProvider, ProviderModelMixin):
extra_data: dict = {},
**kwargs
) -> AsyncResult:
if not model:
model='phi3'
if cls.needs_auth and api_key is None:
raise MissingAuthError('Add a "api_key"')
async with StreamSession(

Loading…
Cancel
Save