fix: telemetry option no longer available in gemini 0.11
fix: fixed tests
This commit is contained in:
@@ -2,8 +2,6 @@
|
|||||||
"name": "gemini",
|
"name": "gemini",
|
||||||
"command": "gemini",
|
"command": "gemini",
|
||||||
"additional_args": [
|
"additional_args": [
|
||||||
"--telemetry",
|
|
||||||
"false",
|
|
||||||
"--yolo"
|
"--yolo"
|
||||||
],
|
],
|
||||||
"env": {},
|
"env": {},
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ class TestPromptIntegration:
|
|||||||
{
|
{
|
||||||
"prompt": "Explain Python decorators in one sentence",
|
"prompt": "Explain Python decorators in one sentence",
|
||||||
"model": "local-llama", # Use available model for integration tests
|
"model": "local-llama", # Use available model for integration tests
|
||||||
|
"working_directory_absolute_path": tempfile.gettempdir(),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -103,6 +104,7 @@ if __name__ == "__main__":
|
|||||||
"prompt": "What does this Python code do?",
|
"prompt": "What does this Python code do?",
|
||||||
"absolute_file_paths": [temp_file],
|
"absolute_file_paths": [temp_file],
|
||||||
"model": "local-llama",
|
"model": "local-llama",
|
||||||
|
"working_directory_absolute_path": tempfile.gettempdir(),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -296,7 +298,13 @@ class UserController:
|
|||||||
tool = ChatTool()
|
tool = ChatTool()
|
||||||
|
|
||||||
# Test with no absolute_file_paths parameter
|
# Test with no absolute_file_paths parameter
|
||||||
result = await tool.execute({"prompt": "Hello", "model": "local-llama"})
|
result = await tool.execute(
|
||||||
|
{
|
||||||
|
"prompt": "Hello",
|
||||||
|
"model": "local-llama",
|
||||||
|
"working_directory_absolute_path": tempfile.gettempdir(),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
assert len(result) == 1
|
assert len(result) == 1
|
||||||
output = json.loads(result[0].text)
|
output = json.loads(result[0].text)
|
||||||
@@ -317,6 +325,7 @@ class UserController:
|
|||||||
"thinking_mode": "low",
|
"thinking_mode": "low",
|
||||||
"temperature": 0.8,
|
"temperature": 0.8,
|
||||||
"model": "local-llama",
|
"model": "local-llama",
|
||||||
|
"working_directory_absolute_path": tempfile.gettempdir(),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -338,7 +347,13 @@ class UserController:
|
|||||||
special_prompt = (
|
special_prompt = (
|
||||||
'Test with "quotes" and\nnewlines\tand tabs. Please just respond with the number that is the answer to 1+1.'
|
'Test with "quotes" and\nnewlines\tand tabs. Please just respond with the number that is the answer to 1+1.'
|
||||||
)
|
)
|
||||||
result = await tool.execute({"prompt": special_prompt, "model": "local-llama"})
|
result = await tool.execute(
|
||||||
|
{
|
||||||
|
"prompt": special_prompt,
|
||||||
|
"model": "local-llama",
|
||||||
|
"working_directory_absolute_path": tempfile.gettempdir(),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
assert len(result) == 1
|
assert len(result) == 1
|
||||||
output = json.loads(result[0].text)
|
output = json.loads(result[0].text)
|
||||||
@@ -404,7 +419,13 @@ class UserController:
|
|||||||
tool = ChatTool()
|
tool = ChatTool()
|
||||||
|
|
||||||
unicode_prompt = "Explain what these mean: 你好世界 (Chinese) and مرحبا بالعالم (Arabic)"
|
unicode_prompt = "Explain what these mean: 你好世界 (Chinese) and مرحبا بالعالم (Arabic)"
|
||||||
result = await tool.execute({"prompt": unicode_prompt, "model": "local-llama"})
|
result = await tool.execute(
|
||||||
|
{
|
||||||
|
"prompt": unicode_prompt,
|
||||||
|
"model": "local-llama",
|
||||||
|
"working_directory_absolute_path": tempfile.gettempdir(),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
assert len(result) == 1
|
assert len(result) == 1
|
||||||
output = json.loads(result[0].text)
|
output = json.loads(result[0].text)
|
||||||
|
|||||||
Reference in New Issue
Block a user