mirror of
https://github.com/ollama/ollama-python.git
synced 2026-05-03 12:52:35 +00:00
fix api calls
This commit is contained in:
+18
-18
@@ -229,7 +229,7 @@ def test_client_pull(httpserver: HTTPServer):
|
||||
'/api/pull',
|
||||
method='POST',
|
||||
json={
|
||||
'model': 'dummy',
|
||||
'name': 'dummy',
|
||||
'insecure': False,
|
||||
'stream': False,
|
||||
},
|
||||
@@ -259,7 +259,7 @@ def test_client_pull_stream(httpserver: HTTPServer):
|
||||
'/api/pull',
|
||||
method='POST',
|
||||
json={
|
||||
'model': 'dummy',
|
||||
'name': 'dummy',
|
||||
'insecure': False,
|
||||
'stream': True,
|
||||
},
|
||||
@@ -275,7 +275,7 @@ def test_client_push(httpserver: HTTPServer):
|
||||
'/api/push',
|
||||
method='POST',
|
||||
json={
|
||||
'model': 'dummy',
|
||||
'name': 'dummy',
|
||||
'insecure': False,
|
||||
'stream': False,
|
||||
},
|
||||
@@ -291,7 +291,7 @@ def test_client_push_stream(httpserver: HTTPServer):
|
||||
'/api/push',
|
||||
method='POST',
|
||||
json={
|
||||
'model': 'dummy',
|
||||
'name': 'dummy',
|
||||
'insecure': False,
|
||||
'stream': True,
|
||||
},
|
||||
@@ -308,7 +308,7 @@ def test_client_create_path(httpserver: HTTPServer):
|
||||
'/api/create',
|
||||
method='POST',
|
||||
json={
|
||||
'model': 'dummy',
|
||||
'name': 'dummy',
|
||||
'modelfile': 'FROM @sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\n',
|
||||
'stream': False,
|
||||
},
|
||||
@@ -331,7 +331,7 @@ def test_client_create_path_relative(httpserver: HTTPServer):
|
||||
'/api/create',
|
||||
method='POST',
|
||||
json={
|
||||
'model': 'dummy',
|
||||
'name': 'dummy',
|
||||
'modelfile': 'FROM @sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\n',
|
||||
'stream': False,
|
||||
},
|
||||
@@ -363,7 +363,7 @@ def test_client_create_path_user_home(httpserver: HTTPServer, userhomedir):
|
||||
'/api/create',
|
||||
method='POST',
|
||||
json={
|
||||
'model': 'dummy',
|
||||
'name': 'dummy',
|
||||
'modelfile': 'FROM @sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\n',
|
||||
'stream': False,
|
||||
},
|
||||
@@ -386,7 +386,7 @@ def test_client_create_modelfile(httpserver: HTTPServer):
|
||||
'/api/create',
|
||||
method='POST',
|
||||
json={
|
||||
'model': 'dummy',
|
||||
'name': 'dummy',
|
||||
'modelfile': 'FROM @sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\n',
|
||||
'stream': False,
|
||||
},
|
||||
@@ -404,7 +404,7 @@ def test_client_create_from_library(httpserver: HTTPServer):
|
||||
'/api/create',
|
||||
method='POST',
|
||||
json={
|
||||
'model': 'dummy',
|
||||
'name': 'dummy',
|
||||
'modelfile': 'FROM llama2\n',
|
||||
'stream': False,
|
||||
},
|
||||
@@ -584,7 +584,7 @@ async def test_async_client_pull(httpserver: HTTPServer):
|
||||
'/api/pull',
|
||||
method='POST',
|
||||
json={
|
||||
'model': 'dummy',
|
||||
'name': 'dummy',
|
||||
'insecure': False,
|
||||
'stream': False,
|
||||
},
|
||||
@@ -601,7 +601,7 @@ async def test_async_client_pull_stream(httpserver: HTTPServer):
|
||||
'/api/pull',
|
||||
method='POST',
|
||||
json={
|
||||
'model': 'dummy',
|
||||
'name': 'dummy',
|
||||
'insecure': False,
|
||||
'stream': True,
|
||||
},
|
||||
@@ -618,7 +618,7 @@ async def test_async_client_push(httpserver: HTTPServer):
|
||||
'/api/push',
|
||||
method='POST',
|
||||
json={
|
||||
'model': 'dummy',
|
||||
'name': 'dummy',
|
||||
'insecure': False,
|
||||
'stream': False,
|
||||
},
|
||||
@@ -635,7 +635,7 @@ async def test_async_client_push_stream(httpserver: HTTPServer):
|
||||
'/api/push',
|
||||
method='POST',
|
||||
json={
|
||||
'model': 'dummy',
|
||||
'name': 'dummy',
|
||||
'insecure': False,
|
||||
'stream': True,
|
||||
},
|
||||
@@ -653,7 +653,7 @@ async def test_async_client_create_path(httpserver: HTTPServer):
|
||||
'/api/create',
|
||||
method='POST',
|
||||
json={
|
||||
'model': 'dummy',
|
||||
'name': 'dummy',
|
||||
'modelfile': 'FROM @sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\n',
|
||||
'stream': False,
|
||||
},
|
||||
@@ -677,7 +677,7 @@ async def test_async_client_create_path_relative(httpserver: HTTPServer):
|
||||
'/api/create',
|
||||
method='POST',
|
||||
json={
|
||||
'model': 'dummy',
|
||||
'name': 'dummy',
|
||||
'modelfile': 'FROM @sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\n',
|
||||
'stream': False,
|
||||
},
|
||||
@@ -701,7 +701,7 @@ async def test_async_client_create_path_user_home(httpserver: HTTPServer, userho
|
||||
'/api/create',
|
||||
method='POST',
|
||||
json={
|
||||
'model': 'dummy',
|
||||
'name': 'dummy',
|
||||
'modelfile': 'FROM @sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\n',
|
||||
'stream': False,
|
||||
},
|
||||
@@ -725,7 +725,7 @@ async def test_async_client_create_modelfile(httpserver: HTTPServer):
|
||||
'/api/create',
|
||||
method='POST',
|
||||
json={
|
||||
'model': 'dummy',
|
||||
'name': 'dummy',
|
||||
'modelfile': 'FROM @sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\n',
|
||||
'stream': False,
|
||||
},
|
||||
@@ -744,7 +744,7 @@ async def test_async_client_create_from_library(httpserver: HTTPServer):
|
||||
'/api/create',
|
||||
method='POST',
|
||||
json={
|
||||
'model': 'dummy',
|
||||
'name': 'dummy',
|
||||
'modelfile': 'FROM llama2\n',
|
||||
'stream': False,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user