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

Add Support for OpenAI Assistants in SAML #755

Merged
merged 28 commits into from
Feb 6, 2024
Merged

Conversation

elisalimli
Copy link
Collaborator

@elisalimli elisalimli commented Feb 4, 2024

Fixes #751

Copy link

vercel bot commented Feb 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
superagent-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 6, 2024 5:49pm

where={"provider": "OPENAI", "apiUserId": api_user.id}
)
oai = AsyncOpenAI(api_key=llm.apiKey)
oai_assistant = await oai.beta.assistants.update(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we are already updating openai assistant above, there's no need for this.

Copy link
Collaborator

@homanp homanp left a comment

Choose a reason for hiding this comment

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

    async for chunk in self.body_iterator:
  File "/Users/ismailpelaseyed/Projects/superagent/libs/superagent/app/api/workflows.py", line 279, in send_message
    track_agent_invocation(
  File "/Users/ismailpelaseyed/Projects/superagent/libs/superagent/app/utils/analytics.py", line 43, in track_agent_invocation
    "llm_model": data.get("agent", {}).get("llmModel", None),
                 ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Agent' object has no attribute 'get'

Getting this when a invoke a workflow that is created. Just press New Workflow and you will see it.

Copy link
Collaborator

@homanp homanp left a comment

Choose a reason for hiding this comment

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

@elisalimli two things:

  1. Stop streaming OpenAI assistnat
  2. Updating workflows breaks the workflow steps as per our call
  3. The agent chat comment I just added to the PR. Fails on build:
Type error: Type '{ type: string; message: string; isSuccess?: boolean \| undefined; key: number; traceId: string; profile: Profile; }' is not assignable to type 'IntrinsicAttributes & MessageProps'.
--
15:59:30.580 | Property 'traceId' does not exist on type 'IntrinsicAttributes & MessageProps'.
15:59:30.580 |  
15:59:30.580 | 214 \|                 <Message
15:59:30.580 | 215 \|                   key={index}
15:59:30.580 | > 216 \|                   traceId={session ? `${agent.id}-${session}` : agent.id}
15:59:30.580 | \|                   ^
15:59:30.580 | 217 \|                   profile={profile}
15:59:30.580 | 218 \|                   {...message}
15:59:30.580 | 219 \|                 />
15:59:30.881 | Error: Command "npm run build" exited with 1

{messages.map((message, index) => (
<Message
key={index}
traceId={session ? `${agent.id}-${session}` : agent.id}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This throws an error in build error:


Type error: Type '{ type: string; message: string; isSuccess?: boolean \| undefined; key: number; traceId: string; profile: Profile; }' is not assignable to type 'IntrinsicAttributes & MessageProps'.
--
15:59:30.580 | Property 'traceId' does not exist on type 'IntrinsicAttributes & MessageProps'.
15:59:30.580 |  
15:59:30.580 | 214 \|                 <Message
15:59:30.580 | 215 \|                   key={index}
15:59:30.580 | > 216 \|                   traceId={session ? `${agent.id}-${session}` : agent.id}
15:59:30.580 | \|                   ^
15:59:30.580 | 217 \|                   profile={profile}
15:59:30.580 | 218 \|                   {...message}
15:59:30.580 | 219 \|                 />
15:59:30.881 | Error: Command "npm run build" exited with 1

@homanp homanp merged commit 6e9df80 into developer-ui Feb 6, 2024
8 checks passed
@elisalimli elisalimli deleted the yaml-openai-assistant branch February 6, 2024 17:46
homanp added a commit that referenced this pull request Feb 7, 2024
* Redo the agents list

* Add agent detail view

* WIP

* Add tabs to agent detail

* Remove datasources from menu (#650)

* Add agent details to overview (#651)

* Add agent details to overview

* Add charts to agent overview

* WIP

* Add Supabase Pgvector  (#653)

* adding supabase pg vector provider to database schema

* add supabase pg vector support

* add supabase pgvector to ui

* add supabase vector store to docs

* add abstract class for vectorstores

* Add missing migrations

---------

Co-authored-by: Ismail Pelaseyed <homanp@gmail.com>

* Update OpenAPI spec

* Add support for removing agent datasource

* Add possibility to create and delete datasources for an assistant

* Pass url when creating datasource

* Remove share agent

* Fix nextjs build errors

---------

Co-authored-by: Ali Salimli <67149699+elisalimli@users.noreply.github.com>

* Agent logs in agent detail view (#657)

* Rename agents to assistants in UI

* Add non-ideal-state to datasources

* Remove vector database setup and ui

* Add logs and clean up routing

* Small tweak

* Add chat to agent detail view (#660)

* Add loading animation to assistant detail view

* Add chat interface to agent detail

* Add chat interface

* Minor tweaks

* Add integrations page (#667)

* Add API endpoint for connecting to BigQuery (#670)

* Add API endpoint for connecting to BigQuery

* Add support for querying by agent id

* Small tweaks

* Revamp the vector databases UI (#668)

* Add integrations page

* Add vector databases to integrations section

* Add green indicator for configured vector databases

* Add the possiblity to update/create new storage connection

* Add key to react node when generating loading animation

* Move fetching of data to server side

* Add log panel content (#673)

* Add log panel content

* Finalize global log view

* Make log items smaller

* Fix formatting

* Small tweaks

* Connect stats to chart

* Minor tweaks

* Yaml assistants (#688)

* Initial commit

* Add sa.yml editor in prototype view

* Minor tweaks

* Minor tweaks

* Remove datasource list

* Finalize saml editor (#702)

* Add workflow list page (#706)

* Add workflow list page

* Add support for fetching stats for workflows

* Refactor routing

* Adapt the chat interface to make requests to workflows endpoint

* Minor additions

* Fix bigquery connection

* Add possiblity to create a workflow (#717)

* Refactor onboarding flow (#718)

* fix code block background color (#721)

* Add workflow list page

* Add support for fetching stats for workflows

* Refactor routing

* Adapt the chat interface to make requests to workflows endpoint

* Minor additions

* Fix bigquery connection

* fix code block background color

* Small tweaks

---------

Co-authored-by: Ismail Pelaseyed <homanp@gmail.com>

* Add LLM onboarding modal to workflow detail page (#726)

* Add LLM onboarding modal to workflow detail page

* Add LLM config onboading UI

* Add segment tracking to UI (#728)

* Add segment tracking to UI

* Update Docker config to support tracking in UI

* Feat/setup stripe plan (#730)

* Implement billing

* Update trial period

* Listing Intermediate Steps (#719)

* Add workflow list page

* Add support for fetching stats for workflows

* Refactor routing

* Adapt the chat interface to make requests to workflows endpoint

* Minor additions

* Fix bigquery connection

* add resizable component

* add listing intermediate steps

* refactor ui

* update default panel size

* Small tweaks

* Minor style fixes

* Add workflow list page

* Adapt the chat interface to make requests to workflows endpoint

* Minor additions

* add resizable component

* add listing intermediate steps

* refactor ui

* update default panel size

* Small tweaks

* Minor tweaks

---------

Co-authored-by: Ismail Pelaseyed <homanp@gmail.com>

* Fix tracing for workflows (#722)

* Fix tracing for workflows

* fix typo

* revert agentops

* refactor callbacks in agent invoke

* add tracking for workflows

---------

Co-authored-by: alisalim17 <alisalimli1899@gmail.com>

* Minor tweaks

* Add support for loading a default yaml (#736)

* Feat/update yaml UI (#739)

* Add support for saving a yaml

* Make it possible to update yaml for a workflow from the UI

* fix renaming keys (#741)

* Fix issue with invoking agent after adding LLM

* Small UI tweaks

* Remove null values from yaml

* Adding autocomplete and linting to SAML editor (#748)

* added monaco

* small fix in monaco editor

* set default panel size

* Small tweaks

* Fix darkmode

---------

Co-authored-by: Ismail Pelaseyed <homanp@gmail.com>

* Add support for additinal agent types in yaml config (#750)

* add agent type to workflow config endpoint

* improving data manipulation

* Minor tweaks

---------

Co-authored-by: Ismail Pelaseyed <homanp@gmail.com>

* Add posthog + small fixes (#753)

* Add first_name an last_name to Stripe customer

* Add possiblity to cancel subscription (#757)

* Feat/billing alert (#759)

* Add a modal when billing has expired

* Minor tweaks

* Minor tweaks

* Fix issue with async container component

* Update docker config with new env vars

* Add Support for OpenAI Assistants in SAML  (#755)

* fix duplicate editor instances

* fix typo

* improve logging - adding stack trace

* refactor openai assistant

* uploading data files to openai assistants api

* fix list workflows endpoint

* added openai assistant

* saving tools and datasources in yaml

* add autocompelete for openai assistant tool names

* refactored code

* add deprecation alert in agents page

* fix metadata json errors

* revert agent chat ui page

* add agent icon to sidebar

* Small tweaks

* Minor tweaks

* Small tweaks

* fix openai assistant's not ending stream

* fix deleting all agents

* fix the build type error

* Small tweak

---------

Co-authored-by: Ismail Pelaseyed <homanp@gmail.com>

* Small tweaks

* Make company name mandatory

* Small tweaks

* Update version

---------

Co-authored-by: Ali Salimli <67149699+elisalimli@users.noreply.github.com>
Co-authored-by: alisalim17 <alisalimli1899@gmail.com>
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.

None yet

2 participants