Skip to content

adding extra-headers to embedding - #6536

Closed
ali-arian wants to merge 3 commits into
BerriAI:mainfrom
ali-arian:feat/passing-extraheaders-on-embedding
Closed

ali-arian wants to merge 3 commits into
BerriAI:mainfrom
ali-arian:feat/passing-extraheaders-on-embedding

Conversation

@ali-arian

@ali-arian ali-arian commented Oct 31, 2024 •

Copy link
Copy Markdown
Contributor

Adding extra-headers to Embedding

This PR fixes the issue with Embedding not passing the extra-headers for azure calls.

Relevant issues

Type

🆕 New Feature
🐛 Bug Fix
🧹 Refactoring
📖 Documentation
🚄 Infrastructure
✅ Test

Changes

[REQUIRED] Testing - Attach a screenshot of any new tests passing locall

If UI changes, send a screenshot/GIF of working UI fixes

@vercel

vercel Bot commented Oct 31, 2024 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 7, 2024 2:42am

@ali-arian

Copy link
Copy Markdown
Contributor Author

@krrishdholakia can you please take a look when you got a chance?

@ali-arian

Copy link
Copy Markdown
Contributor Author

@ishaan-jaff can you please take a look when you got a chance?

@ali-arian

Copy link
Copy Markdown
Contributor Author

@ishaan-jaff can you please take a look when you got a chance? This is blocking us to use the official image.

Comment thread litellm/main.py
optional_params=optional_params,
client=client,
aembedding=aembedding,
extra_headers=extra_headers,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

this is not necessary. extra_headers is already passed via optional_params

@ghost

ghost commented Nov 25, 2024

Copy link
Copy Markdown

Hey @ali-arian extra_headers is already supported on embedding -

optional_params["extra_headers"] = extra_headers

which is passed in the request here -

data = {"model": model, "input": input, **optional_params}

@ghost ghost closed this Nov 25, 2024
This pull request was closed.

This branch was successfully deployed

1 active deployment
Preview — 49d4129f Deployed Nov 7, 2024 by vercel[bot]
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.

1 participant