ollama / ollama/ollama-python

Get custom headers in ChatResponse

Open
#377 5 comments 0 reactions 1 assignee View on GitHub

@ParthSareen is already working on this.

Since Dec 19, 2024.

Dominant language
Python
Stars
10.5k
Forks
1.2k
Avg merge
4m
Merged PRs (30d)
1

Description

I'm using an Nginx server to direct requests made with the Ollama Python library to different running Ollama servers. The Nginx server selects an Ollama server based on availability, among other factors, and sends that information in the X-Choosen-Server header. Using Python's requests library, I can receive this header in the response. However, when using Ollama, it seems like I can't.
Have I overlooked something, or would it be possible to implement custom headers in the ChatResponse?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.