langchaingo icon indicating copy to clipboard operation
langchaingo copied to clipboard

referencing a non-existent version of nhooyr.io/websocket (v1.8.7)

Open Milkhaa opened this issue 7 months ago • 1 comments

langchaingo package (or one of its dependencies) is referencing a non-existent version of nhooyr.io/websocket (v1.8.7)

go: downloading nhooyr.io/websocket v1.8.7 go: ..... imports github.com/tmc/langchaingo/chains tested by github.com/tmc/langchaingo/chains.test imports github.com/tmc/langchaingo/documentloaders imports github.com/AssemblyAI/assemblyai-go-sdk imports nhooyr.io/websocket: reading nhooyr.io/websocket/go.mod at revision v1.8.7: unknown revision v1.8.7 go: ....... imports github.com/tmc/langchaingo/chains tested by github.com/tmc/langchaingo/chains.test imports github.com/tmc/langchaingo/documentloaders imports github.com/AssemblyAI/assemblyai-go-sdk imports nhooyr.io/websocket/wsjson: reading nhooyr.io/websocket/go.mod at revision v1.8.7: unknown revision v1.8.7

Steps to reproduce:

run this example: https://tmc.github.io/langchaingo/docs/modules/agents/executor/#example

Milkhaa avatar Jun 15 '25 15:06 Milkhaa

I had the same issue, the maintainer of this package removed this specific tag due to some security issue. As this is an indirect dependency from assemblyai-sdk -which is itself deprecated) you will have to use the replace mechanism in your go.mod like so:

replace nhooyr.io/websocket => nhooyr.io/websocket v1.8.17

I don't know what is the policy for this in this repo, but this might need more work to get a clean fix this on the long run.

JLugagne avatar Jun 15 '25 21:06 JLugagne