Skip to content

Commit 68ba56b

Browse files
committed
added OpenAI API Python client
1 parent 35d709b commit 68ba56b

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
name: l4t-text-generation
22
group: 'llm'
33
requires: '>=34.1.0'
4-
depends: [mlc, transformers, auto_gptq, gptq-for-llama, exllama, exllama:v2, llama_cpp:gguf, jupyterlab, docker]
4+
depends: [mlc, transformers, auto_gptq, gptq-for-llama, exllama, exllama:v2, llama_cpp:gguf, jupyterlab, docker, openai]

packages/llm/openai/Dockerfile

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#---
2+
# name: openai
3+
# group: llm
4+
# depends: [python]
5+
# test: test.py
6+
# notes: OpenAI API Python client from https://github.com/openai/openai-python
7+
#---
8+
ARG BASE_IMAGE
9+
FROM ${BASE_IMAGE}
10+
11+
RUN pip3 install --no-cache-dir --verbose openai pycurl
12+
RUN python3 -c 'import openai; print(f"OpenAI API version: {openai.__version__}")'
13+
14+
# https://github.com/ggerganov/llama.cpp/discussions/795
15+
# https://github.com/ggerganov/llama.cpp/blob/master/examples/server/README.md
16+
# https://github.com/mckaywrigley/chatbot-ui
17+
# https://llm.mlc.ai/docs/deploy/rest.html
18+
# https://github.com/oobabooga/text-generation-webui/wiki/12-%E2%80%90-OpenAI-API

packages/llm/openai/test.py

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env python3
2+
import openai
3+
from openai import OpenAI
4+
5+
print(f"OpenAI API version: {openai.__version__}")

0 commit comments

Comments
 (0)