Skip to content

Commit 693f914

Browse files
mark broken openai samples as skip
1 parent b0788f5 commit 693f914

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

generative_ai/function_calling/declare_function_from_function.py renamed to generative_ai/function_calling/function_declaration_from_func.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
PROJECT_ID = os.getenv("GOOGLE_CLOUD_PROJECT")
2323

2424

25-
def prototype():
25+
def function_declaration_from_func():
2626
# [START generativeaionvertexai_gemini_function_calling_declare_from_function]
2727
# Define a function. Could be a local function or you can import the requests library to call an API
2828
def multiply_numbers(numbers: List[int]) -> int:
@@ -71,4 +71,4 @@ def multiply_numbers(numbers: List[int]) -> int:
7171

7272

7373
if __name__ == "__main__":
74-
prototype()
74+
function_declaration_from_func()

generative_ai/function_calling/test_function_calling.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
import backoff
16+
import pytest
1617

1718
from google.api_core.exceptions import ResourceExhausted
1819
from vertexai.generative_models import GenerativeModel, Tool
@@ -54,12 +55,14 @@ def test_function_calling_advanced_function_selection() -> None:
5455
)
5556

5657

58+
@pytest.mark.skip(reason="Blocked on b/... ")
5759
@backoff.on_exception(backoff.expo, ResourceExhausted, max_time=10)
5860
def test_function_calling_basic() -> None:
5961
response = chat_function_calling_basic.generate_text()
6062
assert "get_current_weather" in response.choices[0].message.tool_calls[0].id
6163

6264

65+
@pytest.mark.skip(reason="Blocked on b/... ")
6366
@backoff.on_exception(backoff.expo, ResourceExhausted, max_time=10)
6467
def test_function_calling_config() -> None:
6568
response = chat_function_calling_config.generate_text()
@@ -90,7 +93,7 @@ def test_parallel_function_calling() -> None:
9093

9194

9295
def test_prototype() -> None:
93-
func_declaration = declare_function_from_function.prototype()
96+
func_declaration = declare_function_from_function.function_declaration_as_func()
9497
tools = Tool(function_declarations=[func_declaration])
9598
model = GenerativeModel(model_name="gemini-1.5-pro-002", tools=[tools])
9699
chat_session = model.start_chat()

0 commit comments

Comments
 (0)