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

Microsoft/guidance-ai integration with Ollama #389

Closed
JanMP opened this issue Aug 20, 2023 · 3 comments
Closed

Microsoft/guidance-ai integration with Ollama #389

JanMP opened this issue Aug 20, 2023 · 3 comments
Labels
feature request New feature or request help wanted Extra attention is needed

Comments

@JanMP
Copy link

JanMP commented Aug 20, 2023

https://github.com/guidance-ai/guidance seems to be a easy and efficient way to generate tightly controlled output (like e.g json). Is there a way to use it with models provided by ollama?

@antonpolishko
Copy link

I'm interested in guidance support as well.

Skimming through sources looks like guidance supports only OpenAI API endpoint out of the box.

Technically it's possible to wrap either Ollama's API to adhere to OpenAI APIs or create a guidance.llms.ollama. But somebody need to implement that.

Alternatively you can use langchain that already supports ollama server endpoint and has lanchain extraction example

@mchiang0610 mchiang0610 changed the title Is there a way to use ollama with microsoft/guidance-ai Microsoft/guidance-ai integration with Ollama Aug 21, 2023
@mchiang0610 mchiang0610 added feature request New feature or request help wanted Extra attention is needed labels Aug 21, 2023
@breadchris
Copy link

llama.cpp has support for a grammar during inference ggerganov/llama.cpp#1773. Guidance is essentially this, but perhaps implementing this would be in another issue.

@technovangelist
Copy link
Contributor

A few weeks ago we added format: json via the api and the cli. This allows for specifying that the output must be well formed json and allows you to specify the schema to be used. It seems to cover all the aspects of the issue, so I will go ahead and close it now. If you think there is anything we left out, reopen and we can address. Thanks for being part of this great community.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants