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

Multiple AzureOpenAIGenerator serialization issues #40

Closed
alex-stoica opened this issue Oct 21, 2024 · 1 comment
Closed

Multiple AzureOpenAIGenerator serialization issues #40

alex-stoica opened this issue Oct 21, 2024 · 1 comment

Comments

@alex-stoica
Copy link
Contributor

alex-stoica commented Oct 21, 2024

When attempting to deploy a pipeline created with AzureOpenAIGenerator to Hayhooks with hayhooks deploy my_pipeline.yaml, I encountered the following issues:

  1. Unexpected Parameters: Hayhooks did not seem to expect default_headers and generation_kwargs. I removed them from the YAML configuration, and it got better (into the following errors), but I’m unsure why these were problematic.

  2. Pydantic type handling: I encountered type handling issues in Pydantic, specifically with types like Optional[Callable[[StreamingChunk], NoneType]].

  3. Pipeline parameters mismatch: The deployed pipeline required additional parameters beyond those expected in pipe.run(). At this point the pipeline returned the desired results, but I had to pass empty parameters to make it work

  4. 500 Internal Server Error: After resolving issues 2 and 3, I encountered a new error but only when trying to access the /docs page. The logs show the following:

hayhooks-1 | INFO: 172.19.0.1:45200 - "GET /openapi.json HTTP/1.1" 500 Internal Server Error hayhooks-1 | ERROR: Exception in ASGI application

The error seems to originate from Pydantic: pydantic.errors.PydanticInvalidForJsonSchema: Cannot generate a JsonSchema for core_schema.CallableSchema

For reference, the pipeline consisted of a single PromptBuilder and a generator:

AzureOpenAIGenerator(
 azure_deployment=os.environ['AZURE_OPENAI_MODEL_DEPLOYMENT_NAME']
)

I have fixes for issues 2 and 3, but they may not be useful as issue 4 persists.

Deployment: Docker with image deepset/hayhooks:main
Python Version: 3.12

@julian-risch
Copy link
Member

Hello @alex-stoica , @mpangrazzi worked on this issue and we tested and merged #41
In case it still doesn't work for you, feel free to reopen this issue.

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

No branches or pull requests

2 participants