Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SpringAI export #93

Open
corradodebari opened this issue Feb 6, 2025 · 3 comments
Open

SpringAI export #93

corradodebari opened this issue Feb 6, 2025 · 3 comments
Labels
bug Something isn't working Server

Comments

@corradodebari
Copy link
Contributor

SpringAI Settings page, in the release/1.0-beta,
raises this error:

yaml.scanner.ScannerError: mapping values are not allowed here in "<unicode string>", line 45, column 42: ... Follow these strict rules: ^ Traceback: File "/Users/cdebari/Documents/GitHub/oaim-sandbox-langgraph/src/oaim_sandbox.py", line 140, in <module> main() File "/Users/cdebari/Documents/GitHub/oaim-sandbox-langgraph/src/oaim_sandbox.py", line 129, in main pg.run() File "/Users/cdebari/Documents/GitHub/oaim-sandbox-langgraph/.venv/lib/python3.11/site-packages/streamlit/navigation/page.py", line 306, in run exec(code, module.__dict__) File "/Users/cdebari/Documents/GitHub/oaim-sandbox-langgraph/src/sandbox/content/config/settings.py", line 336, in <module> main() File "/Users/cdebari/Documents/GitHub/oaim-sandbox-langgraph/src/sandbox/content/config/settings.py", line 328, in main data=spring_ai_zip(spring_ai_conf, ll_model), # Generate zip on the fly ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/cdebari/Documents/GitHub/oaim-sandbox-langgraph/src/sandbox/content/config/settings.py", line 249, in spring_ai_zip yaml_content = spring_ai_obaas(src_dir, "obaas.yaml", provider, ll_model) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/cdebari/Documents/GitHub/oaim-sandbox-langgraph/src/sandbox/content/config/settings.py", line 214, in spring_ai_obaas yaml_data = yaml.safe_load(formatted_content) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

@corradodebari corradodebari added bug Something isn't working Server labels Feb 6, 2025
@corradodebari
Copy link
Contributor Author

The presence of ":" in the prompt description, i.e.:
Follow these strict rules:

breaks the yaml parsing:

raise ScannerError(None, None, yaml.scanner.ScannerError: mapping values are not allowed here in "<unicode string>", line 45, column 42: ... Follow these strict rules:

@corradodebari
Copy link
Contributor Author

Work around: don't use ":" character in the prompt definition.
Searching a way to avoid the exception.

@gotsysdba
Copy link
Contributor

There's got to be a way to deref before putting in config. Because we allow modification of the prompt by end-user, there's no real way to enforce the workaround. FWIW; probably should look to implement example prompts-per-API. Ollama does not behave well with prompts that work for OpenAI, etc. The current example prompts are a compromise and verbose to get both models to behave similarly (yet Ollama still "acts-up" and hence the "strict rules")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Server
Projects
None yet
Development

No branches or pull requests

2 participants