Coder Social home page Coder Social logo

fixie-sdk-js's Introduction

Fixie Javascript SDK

This is a monorepo providing a TypeScript / JavaScript SDK to the Fixie platform. It contains the following packages:

  • fixie: A NodeJS SDK and CLI.
  • fixie-web: A browser-based SDK.
  • fixie-common: A shared package containing code used by both the NodeJS and browser SDKs.

Full documentation is provided at https://fixie.ai/docs.

Development

This repository uses Yarn workspaces. To build and test the repo locally, run the following commands:

$ yarn
$ yarn build
$ yarn test

You can use yarn format to format the code using Prettier, and yarn lint to lint the code.

When adding new features to the SDK, you can test them locally using yalc.

The workflow is as follows:

  1. In the fixie-sdk-js project run yalc publish. This copies everything that would be published to npm.
  2. In the dependent project where you want to test the updates, run yalc add fixie. This copies the new version locally and adds it as a dependency in package.json.
  3. yalc remove fixie will remove it.

Publishing changes

Please submit a changeset file along with your PR, which is used to automatically bump package versions and publish to npm. To do this, run:

$ yarn changeset

at the root of this tree, and follow the instructions to select which packages should get a version bump. Then git commit the resulting changeset file.

You can then publish the changesets by running:

$ yarn changeset publish --tag unstable

at the top level.

fixie-sdk-js's People

Contributors

benlower avatar farzadab avatar hessamb avatar juberti avatar mdepinet avatar mdwelsh avatar nickheiner avatar petersalas avatar shayangsh avatar stefania11 avatar zkoch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fixie-sdk-js's Issues

Verify JWT in incoming POSTs

smth like

auth = HTTPBearer()

@app.get("/foo")
async def foo(credentials: HTTPAuthorizationCredentials = Depends(auth)):
    if not credentials.scheme == "Bearer":
        raise HTTPException(status_code=401, detail="Invalid authentication scheme")
    if not verify_token(credentials.credentials):
        raise HTTPException(status_code=401, detail="Invalid token")

pip install fixieai errors in python 3.8.10.

On an Ubuntu 20.04 LTS system with python 3.8.10:

$ pip install fixieai

Collecting pycparser
  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
ERROR: astroid 2.7.3 has requirement wrapt<1.13,>=1.11, but you'll have wrapt 1.15.0 which is incompatible.
ERROR: fastapi 0.89.1 has requirement pydantic!=1.7,!=1.7.1,!=1.7.2,!=1.7.3,!=1.8,!=1.8.1,<2.0.0,>=1.6.2, but you'll have pydantic 2.0.3 which is incompatible.

Using a fresh venv, just the second error:

Collecting pycparser
  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
ERROR: fastapi 0.89.1 has requirement pydantic!=1.7,!=1.7.1,!=1.7.2,!=1.7.3,!=1.8,!=1.8.1,<2.0.0,>=1.6.2, but you'll have pydantic 2.0.3 which is incompatible.

Full log:
pip-install-output.txt

Works in python 3.8.17.

Error Not authenticated

When I execute the following command:
fixie agent serve

The server started:

fixie-agent-serve

but the following error occur:

Not-authenticated

I was authenticated with my user linanayail.

Move core agent config to YAML and out of TS server

Once we move base_prompts and few_shots to YAML, the TS func host server should no longer be aware of them.

By doing this, we also remove the need for the TS func host server to be aware of other YAML fields that it presently is not.

pixie agent serve fails without a clear error message

$ fixie agent serve
Opening tunnel to 0.0.0.0:8181 via localhost.run.
This replaces any existing deployment, run fixie deploy to redeploy to prod.

Traceback (most recent call last):
  File "/Users/yves/opt/anaconda3/envs/gpt/bin/fixie", line 8, in <module>
    sys.exit(fixie())
  File "/Users/yves/opt/anaconda3/envs/gpt/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/Users/yves/opt/anaconda3/envs/gpt/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/Users/yves/opt/anaconda3/envs/gpt/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/yves/opt/anaconda3/envs/gpt/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/yves/opt/anaconda3/envs/gpt/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/yves/opt/anaconda3/envs/gpt/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/Users/yves/opt/anaconda3/envs/gpt/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Users/yves/opt/anaconda3/envs/gpt/lib/python3.10/site-packages/fixieai/cli/agent/commands.py", line 424, in serve
    config.deployment_url = next(deployment_urls_iter)
StopIteration

Perhaps the tunnel creation is failing because it's getting blocked by my corp firewall. It would be nice if the error message was clearer.

Docs

Specific things to document:

  • Create agents in TS
  • Use the various platform functionality
  • Run the func host as a standalone/external service?

The router didn't work as supposed, it should pass the request to Dalle or Stable Diffusion rather than style_tranfer.

fixie:
Thought: I need to ask router.

fixie:
Ask Agent[router]: Generate a painting of a cat.

router:
Generate a painting of a cat.

router:
fixie/style_transfer

style_transfer:
Generate a painting of a cat.

style_transfer:
Ask Func[style]: painting of a cat

style_transfer:
Func[style] says: Failed.

style_transfer:
Func[style] says: Failed.

style_transfer:
I'm sorry, I'm unable to generate a painting of a cat.

fixie:
Agent[router] says: I'm sorry, I'm unable to generate a painting of a cat.

fixie:
Thought: I need to tell the user what they need to do.

๐Ÿ› The user encountered an error with the Fixie SDK. The error message was "Required parameter is missing: response_type Learn more about this errorIf you are a developer of this app, see error details.Error 400: invalid_request".

This is an automated bug report from the bug-report agent.
The bug report message is as follows:

The user encountered an error with the Fixie SDK. The error message was "Required parameter is missing: response_type Learn more about this errorIf you are a developer of this app, see error details.Error 400: invalid_request".

Unable to find a signing key that matches: "None"

I started the agent on the local server with the fixie agent serve command.
Then I try to make a request to it like this:

curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer [TOKEN]" -d '{"message":{"text":"time"}}' http://localhost:8181/func

I get this response:

Internal Server Error

Server log:

INFO:     127.0.0.1:34808 - "POST /func HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/home/kol/Projects/fixie-agent/.fixie.venv/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 419, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "/home/kol/Projects/fixie-agent/.fixie.venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
    return await self.app(scope, receive, send)
  File "/home/kol/Projects/fixie-agent/.fixie.venv/lib/python3.10/site-packages/fastapi/applications.py", line 270, in __call__
    await super().__call__(scope, receive, send)
  File "/home/kol/Projects/fixie-agent/.fixie.venv/lib/python3.10/site-packages/starlette/applications.py", line 124, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/kol/Projects/fixie-agent/.fixie.venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in __call__
    raise exc
  File "/home/kol/Projects/fixie-agent/.fixie.venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "/home/kol/Projects/fixie-agent/.fixie.venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
    raise exc
  File "/home/kol/Projects/fixie-agent/.fixie.venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
    await self.app(scope, receive, sender)
  File "/home/kol/Projects/fixie-agent/.fixie.venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
    raise e
  File "/home/kol/Projects/fixie-agent/.fixie.venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
    await self.app(scope, receive, send)
  File "/home/kol/Projects/fixie-agent/.fixie.venv/lib/python3.10/site-packages/starlette/routing.py", line 706, in __call__
    await route.handle(scope, receive, send)
  File "/home/kol/Projects/fixie-agent/.fixie.venv/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
    await self.app(scope, receive, send)
  File "/home/kol/Projects/fixie-agent/.fixie.venv/lib/python3.10/site-packages/starlette/routing.py", line 66, in app
    response = await func(request)
  File "/home/kol/Projects/fixie-agent/.fixie.venv/lib/python3.10/site-packages/fastapi/routing.py", line 237, in app
    raw_response = await run_endpoint_function(
  File "/home/kol/Projects/fixie-agent/.fixie.venv/lib/python3.10/site-packages/fastapi/routing.py", line 165, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
  File "/home/kol/Projects/fixie-agent/.fixie.venv/lib/python3.10/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
  File "/home/kol/Projects/fixie-agent/.fixie.venv/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/home/kol/Projects/fixie-agent/.fixie.venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "/home/kol/Projects/fixie-agent/.fixie.venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "/home/kol/Projects/fixie-agent/.fixie.venv/lib/python3.10/site-packages/fixieai/agents/agent_base.py", line 194, in _serve_func
    token_claims = self.validate_token_and_update_query_access_token(
  File "/home/kol/Projects/fixie-agent/.fixie.venv/lib/python3.10/site-packages/fixieai/agents/agent_base.py", line 168, in validate_token_and_update_query_access_token
    token_claims = VerifiedTokenClaims.from_token(
  File "/home/kol/Projects/fixie-agent/.fixie.venv/lib/python3.10/site-packages/fixieai/agents/agent_base.py", line 252, in from_token
    public_key = jwks_client.get_signing_key_from_jwt(token)
  File "/home/kol/Projects/fixie-agent/.fixie.venv/lib/python3.10/site-packages/jwt/jwks_client.py", line 97, in get_signing_key_from_jwt
    return self.get_signing_key(header.get("kid"))
  File "/home/kol/Projects/fixie-agent/.fixie.venv/lib/python3.10/site-packages/jwt/jwks_client.py", line 87, in get_signing_key
    raise PyJWKClientError(
jwt.exceptions.PyJWKClientError: Unable to find a signing key that matches: "None"

FixieEnvironment is not JSON serializable

Just trying out the deploy of new test agent for first time.

all works well, but when i do
$ fixie agent deploy

I get
File "/usr/local/Cellar/[email protected]/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/encoder.py", line 180, in default
raise TypeError(f'Object of type {o.class.name} '
TypeError: Object of type FixieEnvironment is not JSON serializable

agent is vanilla:
import random
import fixieai

BASE_PROMPT = "I am a simple agent that generates a random number between two given values."
FEW_SHOTS = """
Q: Generate a random number between 0 and 19.
Ask Func[genrand]: 0, 19
Func[genrand] says: 17
A: The random number is 17.

Q: Generate a random value from 5 to 10, inclusive.
Ask Func[genrand]: 5, 10
Func[genrand] says: 8
A: The random number is 8.
"""

agent = fixieai.CodeShotAgent(BASE_PROMPT, FEW_SHOTS)

@agent.register_func()
def genrand(query: fixieai.Message) -> str:
# print("query", query.text)
# foo = query.text.replace(" ", "")
# print("foo", foo)
# bar1, bar2 = foo.split(",")
# print("bar1", bar1, "bar2", bar2)
# print("intbar1", int(float(bar1)), "intbar2", int(float(bar2)))
low, high = query.text.replace(" ", "").split(",")
print("generating that random number", int(float(low)), int(float(high)))
genrand = random.randint(int(float(low)), int(float(high)))
print("genrand", genrand)
return str(genrand)

[sendSessionMessage] Unexpected content-type text/html

I have a problem with sendSessionMessage GraphiQL request.

Request:

mutation sendSessionMessage($messageData: SendSessionMessageInput!) {
  sendSessionMessage(messageData: $messageData) {
    message {
      text
      type
    }
    response {
      text
      type
    }
  }
}

Variables:

{
  "messageData": {
    "session": "coordinated-excessive-chungkingosaurus",
    "text": "time",
    "type": "query",
    "sentBy": "trying"
  }
}

Response:

{
  "errors": [
    {
      "message": "Unexpected content-type text/html",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "sendSessionMessage"
      ]
    }
  ],
  "data": {
    "sendSessionMessage": null
  }
}

In the documentation, I did not find possible options for type, I set:

"type": "query",

by the selection method. But it seemed strange to me.

pip install fixieai

From cmd into Windows:
C:\Windows\system32>pip install fixieai
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution - (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution - (c:\python310\lib\site-packages)
Requirement already satisfied: fixieai in c:\python310\lib\site-packages (0.2.13)
Requirement already satisfied: click<9.0.0,>=8.1.3 in c:\python310\lib\site-packages (from fixieai) (8.1.3)
Requirement already satisfied: python-dotenv<2.0.0,>=1.0.0 in c:\python310\lib\site-packages (from fixieai) (1.0.0)
Requirement already satisfied: rich<13.0.0,>=12.6.0 in c:\python310\lib\site-packages (from fixieai) (12.6.0)
Requirement already satisfied: Pillow in c:\python310\lib\site-packages (from fixieai) (9.5.0)
Requirement already satisfied: PyJWT[crypto]<3.0.0,>=2.6.0 in c:\python310\lib\site-packages (from fixieai) (2.6.0)
Requirement already satisfied: requests<3.0.0,>=2.28.1 in c:\python310\lib\site-packages (from fixieai) (2.28.2)
Requirement already satisfied: gql[requests]<4.0.0,>=3.4.0 in c:\python310\lib\site-packages (from fixieai) (3.4.0)
Requirement already satisfied: prompt-toolkit in c:\users\user\appdata\roaming\python\python310\site-packages (from fixieai) (3.0.38)
Requirement already satisfied: fastapi<0.90.0,>=0.89.1 in c:\python310\lib\site-packages (from fixieai) (0.89.1)
Requirement already satisfied: uvicorn[standard]<0.21.0,>=0.20.0 in c:\python310\lib\site-packages (from fixieai) (0.20.0)
Requirement already satisfied: dataclasses-json<0.6.0,>=0.5.7 in c:\python310\lib\site-packages (from fixieai) (0.5.7)
Requirement already satisfied: validators<0.21.0,>=0.20.0 in c:\python310\lib\site-packages (from fixieai) (0.20.0)
Requirement already satisfied: pydantic in c:\python310\lib\site-packages (from fixieai) (1.10.7)
Requirement already satisfied: oauth2-client<2.0.0,>=1.3.0 in c:\python310\lib\site-packages (from fixieai) (1.3.0)
Requirement already satisfied: colorama in c:\users\user\appdata\roaming\python\python310\site-packages (from click<9.0.0,>=8.1.3->fixieai) (0.4.6)
Requirement already satisfied: marshmallow<4.0.0,>=3.3.0 in c:\python310\lib\site-packages (from dataclasses-json<0.6.0,>=0.5.7->fixieai) (3.19.0)
Requirement already satisfied: marshmallow-enum<2.0.0,>=1.5.1 in c:\python310\lib\site-packages (from dataclasses-json<0.6.0,>=0.5.7->fixieai) (1.5.1)
Requirement already satisfied: typing-inspect>=0.4.0 in c:\python310\lib\site-packages (from dataclasses-json<0.6.0,>=0.5.7->fixieai) (0.8.0)
Requirement already satisfied: starlette==0.22.0 in c:\python310\lib\site-packages (from fastapi<0.90.0,>=0.89.1->fixieai) (0.22.0)
Requirement already satisfied: anyio<5,>=3.4.0 in c:\python310\lib\site-packages (from starlette==0.22.0->fastapi<0.90.0,>=0.89.1->fixieai) (3.6.2)
Requirement already satisfied: yarl<2.0,>=1.6 in c:\python310\lib\site-packages (from gql[requests]<4.0.0,>=3.4.0->fixieai) (1.8.2)
Requirement already satisfied: backoff<3.0,>=1.11.1 in c:\python310\lib\site-packages (from gql[requests]<4.0.0,>=3.4.0->fixieai) (2.2.1)
Requirement already satisfied: graphql-core<3.3,>=3.2 in c:\python310\lib\site-packages (from gql[requests]<4.0.0,>=3.4.0->fixieai) (3.2.3)
Requirement already satisfied: urllib3>=1.26 in c:\python310\lib\site-packages (from gql[requests]<4.0.0,>=3.4.0->fixieai) (1.26.15)
Requirement already satisfied: requests-toolbelt<1,>=0.9.1 in c:\python310\lib\site-packages (from gql[requests]<4.0.0,>=3.4.0->fixieai) (0.10.1)
Requirement already satisfied: typing-extensions>=4.2.0 in c:\python310\lib\site-packages (from pydantic->fixieai) (4.5.0)
Requirement already satisfied: cryptography>=3.4.0 in c:\python310\lib\site-packages (from PyJWT[crypto]<3.0.0,>=2.6.0->fixieai) (39.0.2)
Requirement already satisfied: certifi>=2017.4.17 in c:\python310\lib\site-packages (from requests<3.0.0,>=2.28.1->fixieai) (2022.12.7)
Requirement already satisfied: charset-normalizer<4,>=2 in c:\python310\lib\site-packages (from requests<3.0.0,>=2.28.1->fixieai) (3.1.0)
Requirement already satisfied: idna<4,>=2.5 in c:\python310\lib\site-packages (from requests<3.0.0,>=2.28.1->fixieai) (3.4)
Requirement already satisfied: pygments<3.0.0,>=2.6.0 in c:\users\user\appdata\roaming\python\python310\site-packages (from rich<13.0.0,>=12.6.0->fixieai) (2.14.0)
Requirement already satisfied: commonmark<0.10.0,>=0.9.0 in c:\python310\lib\site-packages (from rich<13.0.0,>=12.6.0->fixieai) (0.9.1)
Requirement already satisfied: h11>=0.8 in c:\python310\lib\site-packages (from uvicorn[standard]<0.21.0,>=0.20.0->fixieai) (0.14.0)
Requirement already satisfied: pyyaml>=5.1 in c:\python310\lib\site-packages (from uvicorn[standard]<0.21.0,>=0.20.0->fixieai) (6.0)
Requirement already satisfied: watchfiles>=0.13 in c:\python310\lib\site-packages (from uvicorn[standard]<0.21.0,>=0.20.0->fixieai) (0.19.0)
Requirement already satisfied: httptools>=0.5.0 in c:\python310\lib\site-packages (from uvicorn[standard]<0.21.0,>=0.20.0->fixieai) (0.5.0)
Requirement already satisfied: websockets>=10.4 in c:\python310\lib\site-packages (from uvicorn[standard]<0.21.0,>=0.20.0->fixieai) (11.0)
Requirement already satisfied: decorator>=3.4.0 in c:\users\user\appdata\roaming\python\python310\site-packages (from validators<0.21.0,>=0.20.0->fixieai) (5.1.1)
Requirement already satisfied: wcwidth in c:\users\user\appdata\roaming\python\python310\site-packages (from prompt-toolkit->fixieai) (0.2.6)
Requirement already satisfied: cffi>=1.12 in c:\python310\lib\site-packages (from cryptography>=3.4.0->PyJWT[crypto]<3.0.0,>=2.6.0->fixieai) (1.15.1)
Requirement already satisfied: packaging>=17.0 in c:\users\user\appdata\roaming\python\python310\site-packages (from marshmallow<4.0.0,>=3.3.0->dataclasses-json<0.6.0,>=0.5.7->fixieai) (23.0)
Requirement already satisfied: mypy-extensions>=0.3.0 in c:\python310\lib\site-packages (from typing-inspect>=0.4.0->dataclasses-json<0.6.0,>=0.5.7->fixieai) (1.0.0)
Requirement already satisfied: multidict>=4.0 in c:\python310\lib\site-packages (from yarl<2.0,>=1.6->gql[requests]<4.0.0,>=3.4.0->fixieai) (6.0.4)
Requirement already satisfied: sniffio>=1.1 in c:\python310\lib\site-packages (from anyio<5,>=3.4.0->starlette==0.22.0->fastapi<0.90.0,>=0.89.1->fixieai) (1.3.0)
Requirement already satisfied: pycparser in c:\python310\lib\site-packages (from cffi>=1.12->cryptography>=3.4.0->PyJWT[crypto]<3.0.0,>=2.6.0->fixieai) (2.21)
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution - (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution - (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution - (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution - (c:\python310\lib\site-packages)

The solution was run the command "pip install fixieai" from Windows PowerShell as administrator. ;-)

`fixie deploy` fails on Windows in 0.2.24

gql internally uses isinstance(x, io.IOBase) to see if a value is a file-like. On macOS this is True for tempfile.TemporaryFile but on Windows this is False, which breaks the CLI.

Cannot delete dummy custom agents

I created several dummy agents as I was testing the templates but I cannot delete them and they confuse the router. Should we add a delete button on the edit agent page?

Not sure what happened but there are 20+ empty sessions added at same time. And you can only delete them one by one.

mirror-pineapple-tabletop

Last edited 44 minutes ago

wise-shadowed-agustinia

Last edited 44 minutes ago

grizzled-psychedelic-abacus

Last edited 44 minutes ago

ethereal-sideways-blarney

Last edited 44 minutes ago

efficient-silicon-area

Last edited 44 minutes ago

horse-diagnostic-cosmos

Last edited 44 minutes ago

whip-mammoth-anorak

Last edited 44 minutes ago

halved-buttery-creek

Last edited 44 minutes ago

juniper-grateful-cormorant

Last edited 44 minutes ago

acoustic-trusted-knuckle

Last edited 44 minutes ago

rocky-stellar-rover

Last edited 44 minutes ago

tan-secret-fahrenheit

Last edited 44 minutes ago

incredible-thread-hemisphere

Last edited 44 minutes ago

adjoining-adventurous-mastodon

Last edited 44 minutes ago

shared-antique-tennis

Last edited 44 minutes ago

silk-everlasting-wineberry

Last edited 44 minutes ago

painted-amethyst-humor

Last edited 44 minutes ago

smooth-invented-guilty

Last edited 44 minutes ago

sudden-unequaled-dolphin

Last edited 44 minutes ago

Error Occurs When Updating Agent Visibility from Private to Public

An ApolloError occurs when attempting to update the visibility status of an agent from "private" to "public." The expected behavior is for the agent's visibility to be successfully updated, but instead, an error is encountered.

Agent Link: https://app.fixie.ai/agents/amrutha97/cat-bot/edit

Unhandled Thrown Error!
Response not successful: Received status code 400
ApolloError: Response not successful: Received status code 400
    at new t (https://app.fixie.ai/static/index-bundle.f0123f283d2c.js:2:511493)
    at Object.error (https://app.fixie.ai/static/index-bundle.f0123f283d2c.js:2:542366)
    at ma (https://app.fixie.ai/static/index-bundle.f0123f283d2c.js:2:467242)
    at ga (https://app.fixie.ai/static/index-bundle.f0123f283d2c.js:2:467705)
    at t.error (https://app.fixie.ai/static/index-bundle.f0123f283d2c.js:2:468298)
    at Object.error (https://app.fixie.ai/static/index-bundle.f0123f283d2c.js:2:505054)
    at ma (https://app.fixie.ai/static/index-bundle.f0123f283d2c.js:2:467242)
    at ga (https://app.fixie.ai/static/index-bundle.f0123f283d2c.js:2:467705)
    at t.error (https://app.fixie.ai/static/index-bundle.f0123f283d2c.js:2:468298)
    at https://app.fixie.ai/static/index-bundle.f0123f283d2c.js:2:509272
๐Ÿ’ฟ Hey developer ๐Ÿ‘‹

You can provide a way better UX than this when your app throws errors by providing your own errorElement props on <Route>

Screenshot 2023-04-27 at 8 53 35 PM

Docs Agent Ignores Base Prompt

Hessam let me know that the docs agent currently ignores the base prompt. I feel strongly that we either use it/support it, or remove it (issue an error if the user provides one).

I believe both Nick and I tried several different base prompts to try to get results that we wanted, not knowing that we were being ignored.

fixieai deploy failing

image

fixieai deploy for my Fixie agent is failing w/ 500, though fixieai serve works fine. My other simple hello_world agent succeeds.

Only difference as far as I know is that I have a .gitignore, import openai, and import another .py file (that is referenced in gitignore). That py file just stores the env variable, and seems to work fine when serving.

Using WLS Ubuntu. Python 3.10.6

Func host should validate the auth token

The NodeJS func host receives a header like:

authorization: Bearer <auth token>

Prior to returning any responses, the func host should validate that this token matches the agent ID the func host was launched for (via --agentId.)

This is necessary because we only want funcs to be called by agents that have access to them.

tuple or dict expected

I started the agent on the local server with the fixie agent serve command.
Then I try to make a request to it like this:

curl -X POST -H "Authorization: Bearer [TOKEN]" -d '{"message":{"text":"time"}}' http://localhost:8181/func

I get this response:

{"detail":[{"loc":["body"],"msg":"instance of AgentQuery, tuple or dict expected","type":"type_error.dataclass","ctx":{"class_name":"AgentQuery"}}]}

I think that most likely I am doing something wrong, tell me please ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.