Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assistants YAML config #643

Merged
merged 21 commits into from
Mar 5, 2024
Merged

Assistants YAML config #643

merged 21 commits into from
Mar 5, 2024

Conversation

raulraja
Copy link
Contributor

@raulraja raulraja commented Jan 22, 2024

Given some yaml config such as:

assistant_id: "asst_S3UbzpWIYuhsFu5cRG7b4dha"
model: "gpt-4-1106-preview"
name: "My Custom Test Assistant"
description: "A versatile AI assistant capable of conversational and informational tasks."
instructions: "This assistant is designed to provide informative and engaging conversations, answer queries, and execute code when necessary."
tools:
   - type: "code_interpreter"
   - type: "retrieval"
   - type: "function"
      name: "get_stock_price"
      description: "Get the current stock price for a given stock symbol."
      parameters: '{
              "type": "object",
              "properties": {
                "symbol": {
                  "type": "string",
                  "description": "The stock symbol"
                }
              },
              "required": [
                "symbol"
              ]
        }'
file_ids:
   - "${file.id}"
metadata: null

Creates or updates an Open AI assistant.
Currently metadata is being ignored until we find the best way to represent it. Current value is null.

assistant: AssistantObject(id=asst_S3UbzpWIYuhsFu5cRG7b4dha, object=assistant, createdAt=1705948119, name=My Custom Test Assistant, description=A versatile AI assistant capable of conversational and informational tasks., model=gpt-4-1106-preview, instructions=This assistant is designed to provide informative and engaging conversations, answer queries, and execute code when necessary., tools=[AssistantToolsCode(type=code_interpreter), AssistantToolsRetrieval(type=retrieval), AssistantToolsFunction(function=FunctionObject(name=get_stock_price, parameters={"type":"object","properties":{"symbol":{"type":"string","description":"The stock symbol"}},"required":["symbol"]}, description=Get the current stock price for a given stock symbol.), type=function)], fileIds=[file-tofd2Y37ykgnnaownzqBdP0r], metadata={})
run: in_progress
received message: MessageContentTextObjectText(value=What does this file say?, annotations=[])
step: tool_calls
run: completed
received message: MessageContentTextObjectText(value=The file contains the following text:
Hello World!, annotations=[])

@raulraja raulraja requested a review from javipacheco January 22, 2024 19:00
@raulraja
Copy link
Contributor Author

It looks like only the JVM target is supported charleskorn/kaml#232. We may need to do further research to find an alternative for multiplatform.

@raulraja raulraja marked this pull request as draft January 22, 2024 19:13
@raulraja raulraja marked this pull request as ready for review January 22, 2024 21:14
javipacheco
javipacheco previously approved these changes Jan 23, 2024
Copy link
Contributor

@javipacheco javipacheco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 LGTM!

Just a minor comment, but maybe it's not important for now

Copy link
Contributor

@realdavidvega realdavidvega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of suggestions to fix the compilation issues after adding the toolsConfig arg.

@raulraja raulraja merged commit 34ad9d2 into main Mar 5, 2024
6 checks passed
@raulraja raulraja deleted the assistants-config branch March 5, 2024 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants