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

[Enhancement] Make this work with the CommunityToolkit #7

Open
dansiegel opened this issue Nov 18, 2024 · 1 comment · May be fixed by #8
Open

[Enhancement] Make this work with the CommunityToolkit #7

dansiegel opened this issue Nov 18, 2024 · 1 comment · May be fixed by #8

Comments

@dansiegel
Copy link

Description

While this works with the Raygun implementation of Ollama this does not currently work with the CommunityToolkit version of Ollama.

Problem

Raygun OllamaResource provides a connection string like:

$"http://{Endpoint.Property(EndpointProperty.Host)}:{Endpoint.Property(EndpointProperty.Port)}"

Where the CommunityToolkit OllamaResource provides a connection string like:

$"Endpoint={PrimaryEndpoint.Property(EndpointProperty.Scheme)}://{PrimaryEndpoint.Property(EndpointProperty.Host)}:{PrimaryEndpoint.Property(EndpointProperty.Port)}"

This results in an error where the connection string may be improperly formatted which results in an error starting the Raygun Host:

2024-11-17T19:38:07
 Unhandled exception. System.UriFormatException: Invalid URI: The URI scheme is not valid.
2024-11-17T19:38:07
    at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions)
2024-11-17T19:38:07
    at System.Uri..ctor(String uriString)
2024-11-17T19:38:07
    at OllamaSharp.OllamaApiClient..ctor(String uriString, String defaultModel)
2024-11-17T19:38:07
    at RaygunAspireWebApp.Program.Main(String[] args) in /src/RaygunAspireWebApp/Program.cs:line 28
@dansiegel dansiegel linked a pull request Nov 18, 2024 that will close this issue
@QuantumNightmare
Copy link
Contributor

Thanks dansiegel. We'll look into this as part of supporting the selected model in the connection string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants