Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
059672e
chore: add devcontainer config
CompuIves Jan 28, 2025
b3caa48
add openapi generation
CompuIves Jan 28, 2025
cab32b9
feat: add dedicated endpoint cli
CompuIves Feb 12, 2025
c983f2e
run lints
CompuIves Feb 12, 2025
c24a510
update makefile
CompuIves Feb 12, 2025
f3b7fe8
rerun formatter
CompuIves Feb 12, 2025
d221092
use poetry 1.8.3
CompuIves Feb 12, 2025
a3c0637
fix tests
CompuIves Feb 13, 2025
d8faecc
make install
CompuIves Feb 13, 2025
94e0c8e
skip openapi spec download in ci
CompuIves Feb 13, 2025
6a8e0e8
add debug step
CompuIves Feb 13, 2025
32f0580
add generated to output
CompuIves Feb 13, 2025
fd0e2cf
remove debug
CompuIves Feb 13, 2025
4828da9
fix poetry inclusion of generated files
CompuIves Feb 13, 2025
dba33c8
fix order of generation
CompuIves Feb 13, 2025
5d40a93
remove 3.8
CompuIves Feb 13, 2025
a904a89
fix normal test
CompuIves Feb 13, 2025
3d59638
try include directive
CompuIves Feb 13, 2025
ea7054f
new try
CompuIves Feb 13, 2025
e9f08af
move
CompuIves Feb 13, 2025
d8766cd
try even more
CompuIves Feb 13, 2025
555f2c4
try manifest
CompuIves Feb 13, 2025
bcaed82
i give up, include openapi generated files
CompuIves Feb 13, 2025
33b6c81
fix mypy error
CompuIves Feb 13, 2025
a10e18a
add hardware call and --wait option
CompuIves Feb 13, 2025
e68aa19
remove openapi client 😭😭😭😭😭
CompuIves Feb 13, 2025
1b1390e
manually update type for now
CompuIves Feb 13, 2025
724dee9
revert poetry
CompuIves Feb 13, 2025
c752304
remove some unnecessary changes
CompuIves Feb 13, 2025
fb69922
bump together-python package version
orangetin Feb 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM mcr.microsoft.com/devcontainers/python:3.9

ENV PYTHONUNBUFFERED 1

RUN pipx install poetry==1.8.3

# Install pre-commit
RUN pip install pre-commit
40 changes: 40 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "Together Python Development",
"build": {
"dockerfile": "Dockerfile"
},
"features": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers/features/java:1": {
"version": "17",
"installMaven": false,
"installGradle": false
}
},
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.isort",
"charliermarsh.ruff",
"ms-python.mypy-type-checker",
"eamodio.gitlens"
],
"settings": {
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff"
},
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.organizeImports": "explicit"
},
"ruff.lineLength": 100
}
}
},
"postCreateCommand": "poetry install",
"remoteUser": "vscode"
}
1 change: 0 additions & 1 deletion .github/workflows/_integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ build-backend = "poetry.masonry.api"

[tool.poetry]
name = "together"
version = "1.4.0"
version = "1.4.1"
authors = [
"Together AI <support@together.ai>"
]
Expand Down
16 changes: 7 additions & 9 deletions src/together/abstract/api_requestor.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ def _prepare_request_raw(
[(k, v) for k, v in options.params.items() if v is not None]
)
abs_url = _build_api_url(abs_url, encoded_params)
elif options.method.lower() in {"post", "put"}:
elif options.method.lower() in {"post", "put", "patch"}:
if options.params and (options.files or options.override_headers):
data = options.params
elif options.params and not options.files:
Expand Down Expand Up @@ -587,16 +587,14 @@ async def arequest_raw(
)
headers["Content-Type"] = content_type

request_kwargs = {
"headers": headers,
"data": data,
"timeout": timeout,
"allow_redirects": options.allow_redirects,
}

try:
result = await session.request(
method=options.method, url=abs_url, **request_kwargs
method=options.method,
url=abs_url,
headers=headers,
data=data,
timeout=timeout,
allow_redirects=options.allow_redirects,
)
utils.log_debug(
"Together API response",
Expand Down
Loading
Loading