Skip to content

Commit

Permalink
[CLN] Import json at top-level in embedding_functions (chroma-core#1562)
Browse files Browse the repository at this point in the history
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
	 - Move `import json` out of Amazon Bedrock EF and to top-level imports

## Test plan
*How are these changes tested?*

- [x] Tests pass locally with `pytest` for python, `yarn test` for js

## Documentation Changes
*Are all docstrings for user-facing APIs updated if required? Do we need
to make documentation changes in the [docs
repository](https://github.com/chroma-core/docs)?*
  • Loading branch information
beggers authored and thorwhalen committed Jan 11, 2024
1 parent 498cffa commit 309a1a8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions chromadb/utils/embedding_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import numpy.typing as npt
import importlib
import inspect
import json
import sys
from typing import Optional

Expand Down Expand Up @@ -740,8 +741,6 @@ def __init__(
)

def __call__(self, input: Documents) -> Embeddings:
import json

accept = "application/json"
content_type = "application/json"
embeddings = []
Expand Down

0 comments on commit 309a1a8

Please sign in to comment.