Skip to content

Commit

Permalink
Merge pull request #81 from video-db/ankit/videodb-llm-proxy
Browse files Browse the repository at this point in the history
docs: update setup.sh
  • Loading branch information
ankit-v2-3 authored Nov 25, 2024
2 parents a19a014 + 7825617 commit d23477f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion backend/director/llm/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class OpenAIChatModel(str, Enum):
GPT4 = "gpt-4"
GPT4_32K = "gpt-4-32k"
GPT4_TURBO = "gpt-4-turbo"
GPT4o = "gpt-4o-2024-08-06"
GPT4o = "gpt-4o-2024-11-20"
GPT4o_MINI = "gpt-4o-mini"


Expand Down
9 changes: 8 additions & 1 deletion backend/director/tools/composio_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ def composio_tool(task: str):
from composio_openai import ComposioToolSet
from openai import OpenAI

openai_client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
key = os.getenv("OPENAI_API_KEY")
base_url = "https://api.openai.com/v1"

if not key:
key = os.getenv("VIDEO_DB_API_KEY")
base_url = os.getenv("VIDEO_DB_BASE_URL", "https://api.videodb.io")

openai_client = OpenAI(api_key=key, base_url=base_url)

toolset = ComposioToolSet(api_key=os.getenv("COMPOSIO_API_KEY"))
tools = toolset.get_tools(apps=json.loads(os.getenv("COMPOSIO_APPS")))
Expand Down
10 changes: 3 additions & 7 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -276,23 +276,19 @@ make update-fe
echo "
*******************************************
* *
* 🎉 Setup Completed Successfully! 🎉 *
* 🎉 Setup Completed Successfully! 🎉 *
* *
* 🚀 IMPORTANT: Next Steps 🚀 *
* *
* 1. Review and Update .env File: *
* - Check the newly created .env file *
* - Add API keys for required services *
* - Example: *
* - OPENAI_API_KEY=sk-*** *
* - VIDEO_DB_API_KEY=sk-*** *
* - Note: (Only ONE LLM key is needed) *
* - Add VIDEO_DB_API_KEY *
* *
* 2. Start the Application: *
* Run the following command: *
* $ make run *
* *
* 🎉 You're all set! Happy coding! 🎉 *
* 🎉 You're all set! Happy coding! 🎉 *
* *
*******************************************
"

0 comments on commit d23477f

Please sign in to comment.