Skip to content

Commit 4eb8ef4

Browse files
committed
cleanup ai plugin instructions
1 parent 9c9737f commit 4eb8ef4

File tree

15 files changed

+41
-10
lines changed

15 files changed

+41
-10
lines changed

docs/ai/instructions/ai-plugin.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11

22
# Plugin Development Guide
33

4-
## Example Plugin
4+
## 1. Copy the example plugin folder
55

6-
An example plugin is located in `plugins/example`. Copying the example is the best way to create a new plugin. After copying the example be sure to:
6+
A sample plugin is located in `plugins/sample_plugin`. Start by copying the sample plugin and renaming it
7+
8+
## 2. Update your new plugin
9+
10+
After you copy the example be sure to:
711

8-
- Update the folder name "example" to your plugin's name
912
- Open `pyproject.toml` and update the name, description etc
10-
- Update the event types in your `events.py` file
11-
- Register your events in the plugin's `__init__` method
1213

1314
## Folder Structure
1415

plugins/openai/vision_agents/plugins/openai/openai_llm.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ def __init__(
5353
self,
5454
model: str,
5555
api_key: Optional[str] = None,
56+
base_url: Optional[str] = None,
5657
client: Optional[AsyncOpenAI] = None,
5758
):
5859
"""
@@ -72,9 +73,9 @@ def __init__(
7273
if client is not None:
7374
self.client = client
7475
elif api_key is not None and api_key != "":
75-
self.client = AsyncOpenAI(api_key=api_key)
76+
self.client = AsyncOpenAI(api_key=api_key, base_url=base_url)
7677
else:
77-
self.client = AsyncOpenAI()
78+
self.client = AsyncOpenAI(base_url=base_url)
7879

7980
async def simple_response(
8081
self,
@@ -118,9 +119,9 @@ async def create_response(
118119
if "stream" not in kwargs:
119120
kwargs["stream"] = True
120121

121-
if not self.openai_conversation:
122-
self.openai_conversation = await self.client.conversations.create()
123-
kwargs["conversation"] = self.openai_conversation.id
122+
#if not self.openai_conversation:
123+
# self.openai_conversation = await self.client.conversations.create()
124+
#kwargs["conversation"] = self.openai_conversation.id
124125

125126
# Add tools if available - convert to OpenAI format
126127
tools_spec = self._get_tools_for_provider()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)