Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions py/bin/run_sample
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PY_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
SAMPLES_DIR="$PY_DIR/samples"

PYTHONPATH="${PYTHONPATH:-}"
export PYTHONPATH="$PY_DIR:$PYTHONPATH"

# List available samples using find for robustness
list_samples() {
# Only list directories that contain a run.sh script
Expand Down Expand Up @@ -82,7 +79,7 @@ fi
if [[ $# -lt 1 ]]; then
while true; do
SAMPLES=$(list_samples)

if [[ -n "$FZF_CMD" ]]; then
# Use fzf with preview window if available
SAMPLE_NAME=$(echo "$SAMPLES" | $FZF_CMD --preview "if [ -f $SAMPLES_DIR/{}/README.md ]; then cat $SAMPLES_DIR/{}/README.md; else echo 'No README found.'; fi" --preview-window=right:60%:wrap --height=100% --reverse --header="Select a sample to run (Ctrl-C to exit sample and return here)")
Expand Down Expand Up @@ -132,7 +129,7 @@ if [[ $# -lt 1 ]]; then
echo "Error: Sample '$SAMPLE_NAME' does not have a 'run.sh' script."
fi
)

echo ""
echo "Sample '$SAMPLE_NAME' exited. Returning to menu..."
echo ""
Expand All @@ -144,7 +141,7 @@ if [[ $# -lt 1 ]]; then
else
SAMPLE_NAME="$1"
shift

SAMPLE_DIR="$SAMPLES_DIR/$SAMPLE_NAME"

if [[ ! -d "$SAMPLE_DIR" ]]; then
Expand Down
5 changes: 3 additions & 2 deletions py/packages/genkit/src/genkit/core/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@
else:
from enum import StrEnum

from typing import Any, Literal
from pydantic.alias_generators import to_camel


from typing import Any, Literal
from pydantic import BaseModel, ConfigDict, Field, RootModel
from pydantic.alias_generators import to_camel


class Model(RootModel[Any]):
Expand Down
Loading
Loading