Skip to content

Commit

Permalink
add missing import and fix octo api key
Browse files Browse the repository at this point in the history
  • Loading branch information
nbsp committed Aug 24, 2024
1 parent 23bbb8c commit 14f55ee
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import base64
import inspect
import json
import os
from dataclasses import dataclass
from typing import Any, Awaitable, List, Tuple, get_args, get_origin

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from __future__ import annotations

import asyncio
import os
from dataclasses import dataclass
from typing import Any, Awaitable, MutableSet

Expand Down Expand Up @@ -182,11 +183,11 @@ def with_octo(
Create a new instance of OctoAI LLM.
``api_key`` must be set to your OctoAI API key, either using the argument or by setting
the ``OCTO_API_KEY`` environmental variable.
the ``OCTOAI_TOKEN`` environmental variable.
"""

# shim for not using OPENAI_API_KEY
api_key = api_key or os.environ.get("OCTO_API_KEY")
api_key = api_key or os.environ.get("OCTOAI_TOKEN")
if api_key is None:
raise ValueError("OctoAI API key is required")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import dataclasses
import io
import os
import wave
from dataclasses import dataclass

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

from __future__ import annotations

import os
from dataclasses import dataclass
from typing import AsyncContextManager

Expand Down

0 comments on commit 14f55ee

Please sign in to comment.