Skip to content

Add support for Ollama backend#54

Open
Dadams2 wants to merge 1 commit intoTNG:mainfrom
Dadams2:main
Open

Add support for Ollama backend#54
Dadams2 wants to merge 1 commit intoTNG:mainfrom
Dadams2:main

Conversation

@Dadams2
Copy link
Copy Markdown

@Dadams2 Dadams2 commented Aug 10, 2024

These are the bare minimum changes. It might be reasonable to also include in the documentation:

  • basic setup instructions for ollama. Specifically running the following before using please:
ollama serve
  • instructions on a good default model to use with ollama e.g -m llama3.1

I think it is somewhat safe to assume that if a user knows they want ollama they will want to specify a model themselves. This assumption is why I have omitted setting more defaults.

Comment thread please.sh
if [ -n "$2" ] && [ "${2:0:1}" != "-" ] && [ "${2:0:3}" == "gpt" ]; then
if [ -n "$2" ] && [ "${2:0:1}" != "-" ]; then
if [ "${api_service}" = "openai" ] && [ "${2:0:3}" != "gpt" ]; then
echo "Error: --model requires a gpt model"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the "--"?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was following the convention of the previous error message

echo "Error: --model requires a gpt model"

or am I missing something else?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry, nevermind.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course you are right. I'm just getting started with work today ;-)

@thomas-endres-tng
Copy link
Copy Markdown
Contributor

Could you also please sign your commit?

@Dadams2
Copy link
Copy Markdown
Author

Dadams2 commented Aug 10, 2024

of course! please forgive the force push

@ghost91-
Copy link
Copy Markdown

ghost91- commented Feb 6, 2025

@Dadams2 I know it’s been a while, but you’ll also need to sign off your commit. If you are still interested in getting this merged, you can easily achieve that by running

git rebase -i origin/main --signoff

The conflicts also need to be resolved, of course.

Signed-off-by: David Adams <david@dadams2.com>
@Dadams2
Copy link
Copy Markdown
Author

Dadams2 commented Feb 19, 2025

@ghost91- Have done!

@thomas-endres-tng
Copy link
Copy Markdown
Contributor

One question about that - you can already set the url manually. Why do we still need the ollama option?

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 this pull request may close these issues.

3 participants